• Home
  • Raw
  • Download

Lines Matching full:update

6 """Library containing functions to execute auto-update on a remote device.
14 * Pre-check for stateful/rootfs update/whole update.
20 ----Auto-Update---
21 * Do rootfs partition update if it's required.
22 * Do stateful partition update if it's required.
28 * Post-check stateful/rootfs update/whole update.
63 # Update Status for remote device.
85 """Thrown when there is a general ChromiumOS-specific update error."""
89 """Raised for the rootfs/stateful update pre-setup failures."""
93 """Raised for the Rootfs partition update failures."""
97 """Raised for the stateful partition update failures."""
101 """Raised for verification failures after auto-update."""
117 """Used to update DUT with image."""
123 # rootfs update files.
152 """Initialize a ChromiumOSUpdater for auto-update a chromium OS device.
156 build_name: the target update version for the device.
163 temporarily keep files when transferring update-utils package, and
164 reserve nebraska and update engine logs.
165 do_rootfs_update: whether to do rootfs partition update. The default is
167 do_stateful_update: whether to do stateful partition update. The default
169 reboot: whether to reboot device after update. The default is True.
172 clobber_stateful: whether to do a clean stateful update. The default is
176 auto-update.
178 update instead of the default: update.gz. Defaults to None. Use
187 ignore_appid: True to tell Nebraska to ignore the update request's
195 else tempfile.mkdtemp(prefix='cros-update'))
199 # Update setting
213 # autoupdate_EndToEndTest uses exact payload filename for update
227 self._cmd_kwargs.update(log_kwargs)
228 self._cmd_kwargs_omit_error.update(log_kwargs)
289 'Cannot continue to perform rootfs update!')
305 """Returns the status of the update engine on the |device|.
307 Retrieves the status from update engine and confirms all keys are
323 raise Exception('Cannot get update status')
328 raise ValueError('Cannot parse update status')
333 raise ValueError('Missing "%s" in the update engine status' % key)
353 """Starts update-engine service if it is not running.
359 result = device.run(['start', 'update-engine'],
362 logging.info('update engine was not running, so we started it.')
368 """Makes sure |device| is ready for rootfs update."""
369 logging.info('Checking if update engine is idle...')
374 self._Reboot('setup of Rootfs Update')
378 raise RootfsUpdateError('Update engine is not idle. Status: %s' % status)
382 self._RetryCommand(['sudo', 'stop', 'ap-update-manager'],
417 The payload filename. (update.gz or a custom payload filename).
425 """Clear any pending stateful update request."""
435 logging.warning('Reverting update; Boot partition will be %s', part)
442 """Update the rootfs partition of the device (utilizing nebraska)."""
456 # Use the localhost IP address (default) to ensure that update engine
464 # If we are using a progress bar, update it every 0.5s instead of 10s.
473 # Loop until update is complete.
485 logging.info('Waiting for update...status: %s at progress %s',
489 logging.info('Update completed.')
501 'Update failed with unexpected update status: %s' % op)
518 logging.error('Rootfs update failed %s', e)
521 raise RootfsUpdateError('Failed to perform rootfs update: %r' % e)
534 """Update the stateful partition of the device."""
540 updater.Update(
545 # Delete the stateful update file on success so it doesn't occupy extra
549 error_msg = 'Stateful update failed with error: %s' % str(e)
555 """Fix the update payload properties file so nebraska can use it.
557 Update the payload properties file to make sure that nebraska can use it.
592 2. Copy files to remote device needed for rootfs update.
607 # update is required.
610 # Copy payload for rootfs update.
618 # Delete the update file so it doesn't take much space on disk for the
619 # remainder of the update process.
625 1. Copy files to remote device needed by stateful update.
626 2. Do stateful update.
644 # is a pending update, which changes the root device, and reboot will
645 # definitely change the root device if update successfully finishes.
656 'Failed to locate root device before update.')
660 'Failed to locate root device after update.')
685 """Update the device with image of specific version."""
697 logging.info('Rootfs update completed.')
701 logging.info('Stateful update completed.')
791 ChromiumOSUpdater tries to update to.
845 event = ('update-engine failed to call '
848 'After update and reboot, %s '
885 """Pre-setup for stateful update for CrOS host."""
886 logging.debug('Start pre-setup for stateful update...')
893 """Post-check for stateful update for CrOS host."""
894 logging.debug('Start post check for stateful update...')
895 self._Reboot('post check of stateful update')
900 # If stateful update succeeds, these test files should not exist.
903 raise StatefulUpdateError('failed to post-check stateful update.')
906 """Check whether update-utils package is well installed.
909 auto-update process. This function double check it and transfer it if it's
961 """Post-check for rootfs update for CrOS host."""
962 logging.debug('Start post check for rootfs update...')
968 raise RootfsUpdateError('Update failed. The priority of the inactive '
974 """Post check for the whole auto-update process."""
975 logging.debug('Post check for the whole CrOS update...')
996 'Failed to update %s to build %s; found build '
1005 logging.warning('Delaying for re-check of %s to update to %s (%s)',
1016 """Do another update check after reboot to get the post update hostlog.
1020 logging.debug('Doing one final update check to get post update hostlog.')
1035 logging.info('Post update check status: %s', op)
1037 logging.error('Post reboot update check failed: %s', str(err))