From 592f9f3c8d3e3fa4b97a32b1ddfdbf60949ef66a Mon Sep 17 00:00:00 2001 From: Jessica Castelino Date: Thu, 6 Oct 2022 04:02:14 +0000 Subject: [PATCH] Modify 'starlingx' ref of feed ostree repo on controller This commit modifies the 'starlingx' ref of feed ostree repo on the controller to point to the active controller's feed ostree repo. This ref is used by patching. After every patch operation we run a patch sync where an ostree pull is done on this ref to sync the feed ostree repos between both the controllers. Command: ostree remote show-url starlingx --repo=/var/www/pages/feed/rel-xx.xx/ostree_repo Output: http://controller:8080/feed/rel-xx.xx/ostree_repo/ Story: 2009969 Task: 46518 Signed-off-by: Jessica Castelino Change-Id: If58631c4053251d342f82d3dd523d03868acb6c3 --- kickstart/files/kickstart.cfg | 6 ++++++ kickstart/files/miniboot.cfg | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/kickstart/files/kickstart.cfg b/kickstart/files/kickstart.cfg index a75b6c42..a1afe51e 100644 --- a/kickstart/files/kickstart.cfg +++ b/kickstart/files/kickstart.cfg @@ -2638,6 +2638,12 @@ if [ "${controller}" = true ] ; then ilog "Replacing ostree sysroot remote with: ${file_feed} ${feed_branch}" ostree --repo=/sysroot/ostree/repo remote delete ${instname} ostree --repo=/sysroot/ostree/repo remote add ${instname} ${file_feed} ${feed_branch} + # Set feed ostree remote "starlingx" to point to active controller's feed ostree repo + feed_remote_name="starlingx" + feed_remote_url="http://controller:8080/feed/rel-${sw_release}/ostree_repo/" + ilog "Replacing ostree feed remote with: ${feed_remote_url} ${feed_remote_name}" + ostree --repo=${repo} remote delete ${feed_remote_name} + ostree --repo=${repo} remote add ${feed_remote_name} ${feed_remote_url} ${feed_branch} # This fetch is only needed once because the repo is stored in /var set_variable "ostree_repo_fetched" diff --git a/kickstart/files/miniboot.cfg b/kickstart/files/miniboot.cfg index cb03ac50..8a387b5a 100644 --- a/kickstart/files/miniboot.cfg +++ b/kickstart/files/miniboot.cfg @@ -2197,6 +2197,12 @@ if [ "${controller}" = true ] ; then ilog "Replacing ostree sysroot remote ${instname} with: ${file_feed} ${feed_branch}" ostree --repo=/sysroot/ostree/repo remote delete ${instname} ostree --repo=/sysroot/ostree/repo remote add ${instname} ${file_feed} ${feed_branch} + # Set feed ostree remote "starlingx" to point to active controller's feed ostree repo + feed_remote_name="starlingx" + feed_remote_url="http://controller:8080/feed/rel-${sw_release}/ostree_repo/" + ilog "Replacing ostree feed remote with: ${feed_remote_url} ${feed_remote_name}" + ostree --repo=${repo} remote delete ${feed_remote_name} + ostree --repo=${repo} remote add ${feed_remote_name} ${feed_remote_url} ${feed_branch} # This fetch is only needed once because the repo is stored in /var set_variable "ostree_repo_fetched"