From 2515808d88af152e499595d44d3786b978062713 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 15 Sep 2015 13:54:15 +0000 Subject: Revert "Make ssh-rsync.check check VERSION_LABEL" This reverts commit 51b71cc42eb9f1d6c35823a490fd73b6bee63eac. This breaks in the case where system-version-manager doesn't have the --json flag, which it wasn't supposed to do. I don't have time to fix right now. See http://listmaster.pepperfish.net/pipermail/baserock-dev-baserock.org/2015-September/013263.html Change-Id: Icbfd7cc0cd8f4dc84d61d2a7f793ad566b67b3d8 --- extensions/ssh-rsync.check | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'extensions') diff --git a/extensions/ssh-rsync.check b/extensions/ssh-rsync.check index fc9bf62d..436aaae0 100755 --- a/extensions/ssh-rsync.check +++ b/extensions/ssh-rsync.check @@ -17,8 +17,6 @@ import os -import json -import logging import writeexts @@ -42,8 +40,6 @@ class SshRsyncCheckExtension(writeexts.WriteExtension): location = args[0] self.check_ssh_connectivity(location) - - self.check_version_label(location, os.environ['VERSION_LABEL']) self.check_is_baserock_system(location) # The new system that being deployed as an upgrade must contain @@ -66,19 +62,5 @@ class SshRsyncCheckExtension(writeexts.WriteExtension): raise writeexts.ExtensionError( "%s does not have %s" % (location, command)) - def check_version_label(self, location, version_label): - args = ['system-version-manager', 'list', '--json'] - - try: - output = writeexts.ssh_runcmd(location, args) - except writeexts.ExtensionError: - msg = ("Couldn't get system list from system-version-manager, " - "skipping version label check") - logging.exception(msg) - return - - if version_label in json.loads(output): - raise writeexts.ExtensionError( - "There is already a system called `%s'" % version_label) SshRsyncCheckExtension().run() -- cgit v1.2.1