Lines Matching +full:stale +full:- +full:issue +full:- +full:label
3 # Use of this source code is governed by a BSD-style license that can be
55 SERVOD_CONTAINER_IMAGE_PATH = "us-docker.pkg.dev/chromeos-partner-moblab/common-core"
100 # The timestamp is of format %Y-%m-%d--%H-%M-%S.MS
101 r'(?P<%s>\d{4}(\-\d{2}){2}\-(-\d{2}){3}.\d{3})'
114 # Here is an example log-line:
116 # 2020-01-23 13:15:12,223 - servo_v4 - EC3PO.Console - DEBUG -
117 # console.py:219:LogConsoleOutput - /dev/pts/9 - cc polarity: cc1
121 # <time> - <MCU> - EC3PO.Console - <LVL> - <file:line:func> - <pts> -
125 MCU_RE = (r'[\d\-]+ [\d:,]+ '
127 r'- (?P<%s>[\w/]+) - '
133 r'EC3PO\.Console[\s\-\w\d:.]+LogConsoleOutput - /dev/pts/\d+ - '
138 # Regex to detect timeout messages when USBC pigtail has timeout issue.
175 # Per-thread local data
233 # Lock the servo host if it's an in-lab labstation to prevent other
308 return maybe_str.decode('utf-8', errors='replace')
341 # xmlrpc/httplib is not thread-safe, so each thread must have its
385 @returns: image_name on the usbkey, e.g. nami-release/R82.10138.0.0,
391 # Unmount if there is an existing stale mount.
401 self.run('cat %s/etc/lsb-release' % mount_dst,
428 # Unmount if there is an existing stale mount.
438 'usr/sbin/chromeos-firmwareupdate')
439 self.run('%s --unpack %s' % (updater_bin, fw_dst))
440 return self._to_str(self.run('%s --manifest' % updater_bin).stdout)
464 # Cleanup and re-create dst path to have a fresh start.
465 self.run('rm -rf %s' % fw_dst)
466 self.run('mkdir -p %s' % fw_dst)
500 cmd = 'futility update -i %s --servo_port=%s'
531 # probe_host_usb_dev() sometimes return stale record,
533 validate_cmd = 'fdisk -l %s' % usb_dev
581 @returns: image_name on the usbkey, e.g. nami-release/R82.10138.0.0,
623 logging.warning('Non-critical verify failure(s) detected during'
658 self.run('rm -f %s' % self._reboot_file, ignore_status=True)
678 ' assuming a pre-configured board.')
758 cmd="servodtool instance wait-for-active -p %s" %
782 logging.warning("Container already exists - not starting")
793 label = os.environ.get("SERVOD_CONTAINER_LABEL", "release")
795 image = "%s/servod:%s" % (registry, label)
832 start_cmds = ["tail", "-f", "/dev/null"]
907 """Helper function to handle non-zero servodtool response.
912 ' power-cycle!')
913 # change the flag so we can update this label in later process.
924 ' file a bug and inform chrome-fleet-software@ team!')
927 """Helper function to collect current usb-path to main servo.
929 The usb-path is path to the folder where usb-device was enumerated.
932 @returns: string, usb-path to the main servo device.
933 e.g.: '/sys/bus/usb/devices/1-6.1.3.1'
935 # TODO remove try-except when fix crbug.com/1087964
937 cmd = 'servodtool device -s %s usb-path' % self.servo_serial
942 logging.debug('Attempt to get servo usb-path failed due to '
1003 # TODO remove try-except when fix crbug.com/1087964
1005 resp = self.run('servodtool device -s %s power-cycle' %
1021 # change the flag so we can update this label in later process.
1026 """Reset(power-cycle) the servo via smart usbhub.
1067 # For all tar-files, first extract them to the directory, and
1073 norm_name = os.path.basename(f)[:-len(self.COMPRESSION_SUFFIX)]
1157 logging.info('This might be an issue. Will extract all logs from each '
1164 # Lastly, servod has restarted due to a potential issue. Try to get
1221 cmd = ('if [ -f %(dir)s/latest.DEBUG ];'
1223 'elif [ -f %(dir)s/latest ];'
1241 fname = fname.decode("utf-8")
1259 # In multi-DUTs testing, each DUTs will may their own servohost
1272 crashcollect.collect_command(self, 'dmesg -H',
1326 cmd = 'find %s -maxdepth 1 -name "log.%s*"' % (self.remote_log_dir,
1364 # TODO(crrev.com/c/1793030): remove no-level case once CL is pushed
1376 # TODO(crrev.com/c/1793030): remove no-level case once CL
1382 files = list(set(files) - set(compressed))
1390 return int(f.split('.')[-1])
1405 local_files = list(set(local_files) - set(files) - set(compressed))
1453 # localhost and instead check against log-rotiation enablement.
1477 # In some cases when we run as lab-tools, the job object is None.
1543 # can be triggered by timeout issue due running the script
1682 logging.info('Servo-Host is not reachable.')
1685 logging.info('Servo-topology required a servo serial.')
1740 host_parts[0] = host_parts[0] + '-servo'
1754 KNOWN_SUFFIXES = ['-freon', '_freon', '_moblab', '-cheets']
1762 mapped_board = afe_board[0:-len(suffix)]
1943 # non-standard servohost so the user will resiponsble for ensure
1956 # TODO(otabek@): Update for servod-manager.
1963 # ServoHost has internal check to wait if servo-host is in reboot
1964 # process. If servo-host still is not available this check will stop
1981 logging.info('[Non-critical] Unexpected error while trying to'
1998 '[Non-critical] Unexpected error while trying to'
2048 # we expecting host contain only latters, digits and '-' or '_'
2049 if not re.match('[a-zA-Z0-9-_\.:]*$', hostname) or len(hostname) < 5: