Skip to content
Snippets Groups Projects
Commit 43cd82ff authored by Denis Pynkin's avatar Denis Pynkin
Browse files

AUM: create noticeable changes for manual tests of offline update

With this change we prepare the "outdated" commit without the
content of some directories. This allows to provide the significant
difference between "original" and "outdated" commits, so it is easy
to check it in booted deployment.
The side effect of huge size difference during upgrade is more stable
and convenient testing of "disk full" and "usb unplug" cases.

More detailed description is available here:
https://phabricator.apertis.org/T5439#189061



Signed-off-by: default avatarDenis Pynkin <denis.pynkin@collabora.com>
parent 0ed49b90
No related branches found
No related tags found
No related merge requests found
...@@ -34,14 +34,19 @@ run: ...@@ -34,14 +34,19 @@ run:
- "Get the Collection ID and ref" - "Get the Collection ID and ref"
- $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID - $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID
- $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF - $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF
- "Create the commit with changed timestamp to allow upgrade with recent update file" - "Create the list of files to skip and enshure there are some files in these directories"
- $ ls -1d /usr/share/locale /usr/share/man /usr/share/zoneinfo > /tmp/skip
- $ du -sh /usr/share/locale /usr/share/man /usr/share/zoneinfo
- "Create the commit with changed timestamp and skipped list from above to allow upgrade with recent update file"
- | - |
$ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago"); echo "New commit: $NEWID" $ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago" --skip-list=/tmp/skip); echo "New commit: $NEWID"
- "Deploy the prepared commit" - "Deploy the prepared commit"
- $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot - $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot
- "Wait until the system is booted again and check the deployment" - "Wait until the system is booted again and check the deployment"
- $ sudo ostree admin status - $ sudo ostree admin status
- "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'" - "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'"
- "Check booted deployment have no file objects which we skip"
- $ du -sh /usr/share/locale /usr/share/man /usr/share/zoneinfo
- "Remove the initial deployment" - "Remove the initial deployment"
- $ sudo ostree admin undeploy 1 - $ sudo ostree admin undeploy 1
- "Reboot the system" - "Reboot the system"
......
...@@ -32,14 +32,19 @@ run: ...@@ -32,14 +32,19 @@ run:
- "Get the Collection ID and ref" - "Get the Collection ID and ref"
- $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID - $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID
- $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF - $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF
- "Create the commit with changed timestamp to allow upgrade with recent update file" - "Create the list of files to skip and enshure there are some files in these directories"
- $ ls -1d /usr/share/locale /usr/share/man /usr/share/zoneinfo > /tmp/skip
- $ du -sh /usr/share/locale /usr/share/man /usr/share/zoneinfo
- "Create the commit with changed timestamp and skipped list from above to allow upgrade with recent update file"
- | - |
$ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago"); echo "New commit: $NEWID" $ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago" --skip-list=/tmp/skip); echo "New commit: $NEWID"
- "Deploy the prepared commit" - "Deploy the prepared commit"
- $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot - $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot
- "Wait until the system is booted again and check the deployment" - "Wait until the system is booted again and check the deployment"
- $ sudo ostree admin status - $ sudo ostree admin status
- "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'" - "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'"
- "Check booted deployment have no file objects which we skip"
- $ du -sh /usr/share/locale /usr/share/man /usr/share/zoneinfo
- "Remove the initial deployment" - "Remove the initial deployment"
- $ sudo ostree admin undeploy 1 - $ sudo ostree admin undeploy 1
- "Reboot the system" - "Reboot the system"
......
...@@ -34,14 +34,19 @@ run: ...@@ -34,14 +34,19 @@ run:
- "Get the Collection ID and ref" - "Get the Collection ID and ref"
- $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID - $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID
- $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF - $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF
- "Create the commit with changed timestamp to allow upgrade with recent update file" - "Create the list of files to skip and enshure there are some files in these directories"
- $ ls -1d /usr/share/locale /usr/share/man /usr/share/zoneinfo > /tmp/skip
- $ du -sh /usr/share/locale /usr/share/man /usr/share/zoneinfo
- "Create the commit with changed timestamp and skipped list from above to allow upgrade with recent update file"
- | - |
$ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago"); echo "New commit: $NEWID" $ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago" --skip-list=/tmp/skip); echo "New commit: $NEWID"
- "Deploy the prepared commit" - "Deploy the prepared commit"
- $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot - $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot
- "Wait until the system is booted again and check the deployment" - "Wait until the system is booted again and check the deployment"
- $ sudo ostree admin status - $ sudo ostree admin status
- "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'" - "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'"
- "Check booted deployment have no file objects which we skip"
- $ du -sh /usr/share/locale /usr/share/man /usr/share/zoneinfo
- "Remove the initial deployment" - "Remove the initial deployment"
- $ sudo ostree admin undeploy 1 - $ sudo ostree admin undeploy 1
- "Reboot the system" - "Reboot the system"
......
...@@ -31,14 +31,19 @@ run: ...@@ -31,14 +31,19 @@ run:
- "Get the Collection ID and ref" - "Get the Collection ID and ref"
- $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID - $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID
- $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF - $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF
- "Create the commit with changed timestamp to allow upgrade with recent update file" - "Create the list of files to skip and enshure there are some files in these directories"
- $ ls -1d /usr/share/locale /usr/share/man /usr/share/zoneinfo > /tmp/skip
- $ du -sh /usr/share/locale /usr/share/man /usr/share/zoneinfo
- "Create the commit with changed timestamp and skipped list from above to allow upgrade with recent update file"
- | - |
$ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago"); echo "New commit: $NEWID" $ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago" --skip-list=/tmp/skip); echo "New commit: $NEWID"
- "Deploy the prepared commit" - "Deploy the prepared commit"
- $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot - $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot
- "Wait until the system is booted again and check the deployment" - "Wait until the system is booted again and check the deployment"
- $ sudo ostree admin status - $ sudo ostree admin status
- "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'" - "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'"
- "Check booted deployment have no file objects which we skip"
- $ du -sh /usr/share/locale /usr/share/man /usr/share/zoneinfo
- "Remove the initial deployment" - "Remove the initial deployment"
- $ sudo ostree admin undeploy 1 - $ sudo ostree admin undeploy 1
- "Reboot the system" - "Reboot the system"
......
...@@ -35,14 +35,19 @@ run: ...@@ -35,14 +35,19 @@ run:
- "Get the Collection ID and ref" - "Get the Collection ID and ref"
- $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID - $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID
- $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF - $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF
- "Create the commit with changed timestamp to allow upgrade with recent update file" - "Create the list of files to skip and enshure there are some files in these directories"
- $ ls -1d /usr/share/locale /usr/share/man /usr/share/zoneinfo > /tmp/skip
- $ du -sh /usr/share/locale /usr/share/man /usr/share/zoneinfo
- "Create the commit with changed timestamp and skipped list from above to allow upgrade with recent update file"
- | - |
$ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago"); echo "New commit: $NEWID" $ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago" --skip-list=/tmp/skip); echo "New commit: $NEWID"
- "Deploy the prepared commit" - "Deploy the prepared commit"
- $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot - $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot
- "Wait until the system is booted again and check the deployment" - "Wait until the system is booted again and check the deployment"
- $ sudo ostree admin status - $ sudo ostree admin status
- "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'" - "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'"
- "Check booted deployment have no file objects which we skip"
- $ du -sh /usr/share/locale /usr/share/man /usr/share/zoneinfo
- "Remove the initial deployment" - "Remove the initial deployment"
- $ sudo ostree admin undeploy 1 - $ sudo ostree admin undeploy 1
- "Add udev rule for limiting the maximal read speed from USB drive to 1MBps." - "Add udev rule for limiting the maximal read speed from USB drive to 1MBps."
......
...@@ -37,14 +37,19 @@ run: ...@@ -37,14 +37,19 @@ run:
- "Get the Collection ID and ref" - "Get the Collection ID and ref"
- $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID - $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID
- $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF - $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF
- "Create the commit with changed timestamp to allow upgrade with recent update file" - "Create the list of files to skip and enshure there are some files in these directories"
- $ ls -1d /usr/share/locale /usr/share/man /usr/share/zoneinfo > /tmp/skip
- $ du -sh /usr/share/locale /usr/share/man /usr/share/zoneinfo
- "Create the commit with changed timestamp and skipped list from above to allow upgrade with recent update file"
- | - |
$ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago"); echo "New commit: $NEWID" $ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago" --skip-list=/tmp/skip); echo "New commit: $NEWID"
- "Deploy the prepared commit" - "Deploy the prepared commit"
- $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot - $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot
- "Wait until the system is booted again and check the deployment" - "Wait until the system is booted again and check the deployment"
- $ sudo ostree admin status - $ sudo ostree admin status
- "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'" - "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'"
- "Check booted deployment have no file objects which we skip"
- $ du -sh /usr/share/locale /usr/share/man /usr/share/zoneinfo
- "Remove the initial deployment" - "Remove the initial deployment"
- $ sudo ostree admin undeploy 1 - $ sudo ostree admin undeploy 1
- "Reboot the system" - "Reboot the system"
......
...@@ -33,14 +33,19 @@ run: ...@@ -33,14 +33,19 @@ run:
- "Get the Collection ID and ref" - "Get the Collection ID and ref"
- $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID - $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID
- $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF - $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF
- "Create the commit with changed timestamp to allow upgrade with recent update file" - "Create the list of files to skip and enshure there are some files in these directories"
- $ ls -1d /usr/share/locale /usr/share/man /usr/share/zoneinfo > /tmp/skip
- $ du -sh /usr/share/locale /usr/share/man /usr/share/zoneinfo
- "Create the commit with changed timestamp and skipped list from above to allow upgrade with recent update file"
- | - |
$ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago"); echo "New commit: $NEWID" $ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago" --skip-list=/tmp/skip); echo "New commit: $NEWID"
- "Deploy the prepared commit" - "Deploy the prepared commit"
- $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot - $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot
- "Wait until the system is booted again and check the deployment" - "Wait until the system is booted again and check the deployment"
- $ sudo ostree admin status - $ sudo ostree admin status
- "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'" - "The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'"
- "Check booted deployment have no file objects which we skip"
- $ du -sh /usr/share/locale /usr/share/man /usr/share/zoneinfo
- "Remove the initial deployment" - "Remove the initial deployment"
- $ sudo ostree admin undeploy 1 - $ sudo ostree admin undeploy 1
- "Add udev rule for limiting the maximal read speed from USB drive to 64Kbps." - "Add udev rule for limiting the maximal read speed from USB drive to 64Kbps."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment