summaryrefslogtreecommitdiff
path: root/morphlib/exts/ssh-rsync.write
Commit message (Collapse)AuthorAgeFilesLines
* Use the modern way of the GPL copyright header: URL instead real addressJavier Jardón2015-03-161-3/+2
| | | | Change-Id: I992dc0c1d40f563ade56a833162d409b02be90a0
* Add a reference to write.help filePete Fotheringham2014-12-081-8/+2
|
* Use the default symlink when creating the orig subvolume.Pedro Alvarez2014-11-051-2/+2
| | | | | | | | | | | | | | | This patch solves the issue caused by upgrading a system without a factory version. Currently we are only using the factory version to snapshot its orig subvolume to make faster the transfer of the new content (rsync won't have to send everything). The default symlink may not be present, but it can't be deleted easily using system-version-manager. This is a quick fix, but in the future we may want to not harcode the path from where we snapshot the orig subvolume. Or improve system-version-manager to make sure that the default symlink is always present.
* Merge branch 'baserock/richardmaw/fix-ssh-rsync-destroying-versions'Richard Maw2014-10-101-77/+105
|\ | | | | | | | | | | Reviewed-by: Sam Thursfield Reviewed-by: Jim MacArthur Reviewed-by: Richard Ipsum
| * ssh-rsync: Don't delete version if it existsRichard Maw2014-10-101-77/+105
|/ | | | | | | | | | | | | | | | A quirk in the resource cleanup code meant that if you gave the same version label when deploying a new version, then it would fail, then remove the old version, as it had assumed that it was the one to create those directories. This patch fixes this issue by making short context managers for all the resource allocation, so cleanup is done by walking up the context managers, so only the mount and the temporary directory need to be cleaned up if the `mkdir "$VERSION_ROOT"` fails. I've tested this with a deploy of a version that doesn't already exist, and the version I'm currently running, so I can conclusively say it's fixed that problem.
* deploy: Make ssh-rsync upgrade extension handle unset VERSION_LABELSam Thursfield2014-10-081-1/+1
| | | | | | | | | | | | | | | | It now gives an error message. Previously it would fail with a backtrace like this: 2014-10-08 09:51:37 [systems/genivi-baseline-system-armv7lhf-jetson.morph][self]Removing temporary mounts Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/cliapp/app.py", line 190, in _run self.process_args(args) File "/src/morph/morphlib/exts/ssh-rsync.write", line 54, in process_args self.upgrade_remote_system(location, temp_root) File "/src/morph/morphlib/exts/ssh-rsync.write", line 107, in upgrade_remote_system location, ['btrfs', 'subvolume', 'delete', orig_dir]) UnboundLocalError: local variable 'orig_dir' referenced before assignment
* ssh-rsync: gett UUID of the disk before writing fstabPedro Alvarez2014-10-011-2/+5
| | | | | | | | | With this patch, the fstab of the system to be deployed as an upgrade will be conifgured using the UUID of the disk. Now when doing an upgrade is not needed to specify the ROOT_DEVICE.
* deploy: Do sanity checks earlier in ssh-rsync (upgrade) extensionSam Thursfield2014-05-201-26/+0
|
* deploy: Honour AUTOSTART in ssh-rsync extensionSam Thursfield2014-03-041-0/+5
| | | | | Now you can deploy an upgrade, set it to be the default version and reboot into it all with one call to `morph deploy`.
* deploy: Always set new system as defaultSam Thursfield2014-03-041-0/+5
|
* deploy: Depend on client OS version manager to deploy upgradesSam Thursfield2014-03-041-91/+41
| | | | | | We now have a OS version manager tool in Baserock (in tbdiff.git). The code to deploy a new base OS version should live there, to minimise duplication between write extensions.
* deploy: Finish off the Btrfs system layout implementationSam Thursfield2014-03-041-0/+2
| | | | | | | | | | | | | | | The shared state directories defined in writeexts.py (/var, /home etc.) are now separate Btrfs subvolumes that are mounted in place using fstab. There are some warnings on mounting /var and /srv about the mountpoint not being empty. Not yet investigated. If a configure extension has already added / to the fstab, use the device it chose rather than assuming /dev/sda. This is required for the vdaboot.configure extension that we use for OpenStack deployments. Similarly, if a configure extension has added an entry for a state directory in /etc/fstab already, we don't replace it with a /state/xxx directory. That's only done as a default behaviour.
* Improvements to ssh-rsync extensionTiago Gomes2013-07-011-70/+80
|
* Run the merge mode of baserock-system-config-sync when upgrading running ↵Tiago Gomes2013-06-171-0/+9
| | | | systems.
* Add a missing trailing slash to the source directory of rsyncTiago Gomes2013-06-171-1/+2
| | | | | | | | | Accordingly the rsync manual: "A trailing slash on the source changes this behavior to avoid creating an additional directory level at the destination. You can think of a trailing / on a source as meaning "copy the contents of this directory" as opposed to "copy the directory by name".
* Unmount the remote mouting point instead of the root diskTiago Gomes2013-06-151-1/+1
| | | | Unmounting the root disk as the side effect of turn it to be read only
* Don't dereference the default symbolic link when updating itTiago Gomes2013-06-151-2/+1
| | | | | | | | | | | | | | Or else this ln -s -f update1 /mp/systems/default will do this '/pp/systems/default/update1' -> 'update1 When we want '/pp/systems/default' -> 'update1
* Write extensions: pass -s to rsyncRichard Maw2013-06-091-3/+3
| | | | | | | | | | | | | -s, or --protect-args prevents the file path components of destination or source paths being interpreted by the remote shell. This is for wildcards or other shell features, but it breaks when paths have whitespace. We tend to always use absolute paths, so all uses of rsync now pass -s. kvm.write needs it, since the disk can be written to a path with spaces. Nfsboot and ssh-rsync need it because version labels are used, which may have spaces, and temporary directories are used, which could have spaces in weird TMPDIR configurations.
* Fix a typoTiago Gomes2013-06-191-1/+1
|
* Support upgrades in older running versions.Tiago Gomes2013-06-141-3/+11
| | | | | | | Verify if are using and older extlinux configuration and upgrade it if the case, by checking if the "default" symbolic link exists on the target. Note that with the symbolic link we don't need to update extlinux configuration after an upgrade
* Create a symbolic link to the default system version when upgrading running ↵Tiago Gomes2013-06-141-2/+6
| | | | systems.
* Add ssh-rsync write extensionJonathan Maw2013-05-281-0/+181
This is used to perform upgrades on running baserock systems. It requires rsync on the target system