Skip to content

Commit 97ce604

Browse files
Simon Rowerobhoes
authored andcommitted
CA-237415: remove update group from yum
The commit 7607044 causes yum to add 'update' to the list of groups. Attempting to reinstall an update then fails to install the payload packages because yum believes the group to still be present. Marking the group as removed fixes this. Signed-off-by: Simon Rowe <[email protected]>
1 parent f229855 commit 97ce604

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

scripts/extensions/pool_update.apply

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ def execute_apply(session, update_package, yum_conf_file):
6363
raise ApplyFailure(output)
6464

6565

66+
def remove_group(group):
67+
cmd = ['yum', 'group', 'mark', 'remove', group]
68+
p = subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True)
69+
output, _ = p.communicate()
70+
xcp.logger.info('pool_update.apply %r returncode=%r output=%r', cmd, p.returncode, output)
71+
if p.returncode != 0:
72+
raise ApplyFailure(output)
73+
74+
6675
if __name__ == '__main__':
6776
xcp.logger.logToSyslog(level=logging.INFO)
6877
txt = sys.stdin.read()
@@ -126,6 +135,7 @@ if __name__ == '__main__':
126135
file.write("{0}".format(yum_conf))
127136

128137
execute_apply(session, '@update', yum_conf_file)
138+
remove_group('update')
129139

130140
session.xenapi.pool_update.resync_host(host)
131141
print(success_message())

0 commit comments

Comments
 (0)