Repository navigation
Conversation
…RESS status in device_stable (b/573531479)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / Problem
This Pull Request resolves Buganizer ticket b/573531479 per user instructions:
"move os_discover to a dedicared method and call it right after set testryStatus.IN_PROGRESS in device_stable method and create a pull request".
Previously, device OS discovery via Nmap and SSH was executed synchronously inside the sniffer packet monitoring loop in
NetworkOrchestrator._start_device_monitor(framework/python/src/net_orc/network_orchestrator.py). Performing OS discovery within the monitoring loop coupled network traffic capture with active network scanning probes and blocked timely monitor packet polling and state transitions.Root Cause
In
NetworkOrchestrator._start_device_monitor, the loopwhile sniffer.running:executed OS discovery attempts (util.get_device_os_nmapandutil.get_device_os_ssh) during passive packet capture. This discovery logically belongs to the core test execution flow when the device reaches steady state and transitions toTestrunStatus.IN_PROGRESS.Changes Made
framework/python/src/net_orc/network_orchestrator.py:device_os_discover_attempts,util.get_device_os_nmap,util.get_device_os_ssh) from inside thewhile sniffer.running:loop in_start_device_monitor.framework/python/src/core/testrun.py:_device_stable(self, mac_addr): Added a call toself._os_discover(mac_addr)immediately followingself._set_status(TestrunStatus.IN_PROGRESS)._os_discover(self, mac_addr=None)(with aliasos_discover = _os_discover) that:util.get_device_os_nmapandutil.get_device_os_ssh.self.get_session().set_device_kernel(device_os).Verification Plan
framework/python/src/core/testrun.pyandframework/python/src/net_orc/network_orchestrator.pyparse with no syntax errors._os_discoverhandles missing devices / IP addresses gracefully.MONITORINGcompletes without OS probe interference, followed by transition toIN_PROGRESS.Discovering device OS for <ip_addr>andDiscovered device OS: <device_os>upon enteringdevice_stable.Branch comparison against
dev: dev...fix-ai/move-os-discover-device-stable