Merge "Perform remote ostree pull during local-based ostree install"
This commit is contained in:
commit
07640af5df
@ -2047,7 +2047,11 @@ else
|
||||
|
||||
# If ostree_repo is found at the mounted backup directory,
|
||||
# then set the ostree url to its location.
|
||||
remote_insturl=
|
||||
if [ -e ${backup_mount}/ostree_repo ]; then
|
||||
# Preserve remote_insturl for use in 2nd ostree pull below
|
||||
remote_insturl=${insturl}
|
||||
|
||||
insturl="file:///${backup_mount}/ostree_repo"
|
||||
ilog "Setting insturl to ${insturl} to use prestaged ostree_repo"
|
||||
fi
|
||||
@ -2080,9 +2084,34 @@ else
|
||||
report_failure_with_msg "ostree pull failed, rc=$rc"
|
||||
fi
|
||||
|
||||
if [ -n "${remote_insturl}" ]; then
|
||||
# In this case, we've initialized our ostree repo from local disk
|
||||
# store - either via prestaging or due to installing from ISO.
|
||||
# We now perform an extra ostree pull from the system controller
|
||||
# in order to pick up any patch commits.
|
||||
ilog "ostree_repo archive pull from ${remote_insturl} for patch commits"
|
||||
|
||||
# Set feed ostree remote "starlingx" to point to active controller's feed ostree repo
|
||||
ilog "Replacing ostree feed remote with: ${remote_insturl} ${instbr}"
|
||||
ostree --repo=${repo} remote delete ${instbr}
|
||||
ostree --repo=${repo} remote add ${instbr} ${remote_insturl} ${instbr}
|
||||
if grep -q noverifyssl /proc/cmdline 2>/dev/null; then
|
||||
ilog "Configuring ostree for unverified SSL"
|
||||
ostree config --repo=${repo} set "remote \"${instbr}\"".tls-permissive true
|
||||
fi
|
||||
ilog "Executing ostree pull from ${remote_insturl}:"
|
||||
ilog "ostree --repo=${repo} pull --depth=-1 --mirror ${instbr}:${instbr}"
|
||||
ostree --repo=${repo} pull --depth=-1 --mirror ${instbr}:${instbr}
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]; then
|
||||
report_failure_with_msg "ostree pull failed, rc=$rc"
|
||||
fi
|
||||
fi
|
||||
ilog "ostree log for ${repo}, branch=${instbr}:"
|
||||
ostree --repo=${repo} log ${instbr}
|
||||
|
||||
umount ${backup_mount}
|
||||
umount ${PHYS_SYSROOT}
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user