When a cluster is upgraded using the argo cli, the upgrade fails with the error "'Cloud' object has no attribute '_target_cloud', program might be running locally"
$ argocluster upgrade --cluster-name dev-new --cloud-profile prod --cloud-provider aws
...
2017-08-25T16:14:40 WARNING ax.cloud.cloud MainThread: Cannot determine own cloud: 'Cloud' object has no attribute '_target_cloud', program might be running locally
Traceback (most recent call last):
File "/ax/bin/master_manager", line 31, in <module>
run()
File "/ax/bin/master_manager", line 24, in run
m = AXMasterManager(usr_args.cluster_name_id, profile=usr_args.profile, region=usr_args.region)
File "/ax/python/ax/platform/ax_master_manager.py", line 72, in __init__
self.cluster_info = AXClusterInfo(cluster_name_id=cluster_name_id, aws_profile=profile)
File "/ax/python/ax/util/singleton.py", line 15, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/ax/python/ax/platform/ax_cluster_info.py", line 50, in __init__
self._config = AXClusterConfig(cluster_name_id=cluster_name_id, aws_profile=aws_profile)
File "/ax/python/ax/util/singleton.py", line 15, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/ax/python/ax/platform/cluster_config/cluster_config.py", line 31, in __init__
self._cluster_name_id = AXClusterId(name=cluster_name_id, aws_profile=aws_profile).get_cluster_name_id()
File "/ax/python/ax/meta/cluster_id.py", line 103, in get_cluster_name_id
self._load_cluster_name_id_if_needed()
File "/ax/python/ax/meta/cluster_id.py", line 120, in _load_cluster_name_id_if_needed
self._load_cluster_name_id()
File "/ax/python/ax/meta/cluster_id.py", line 148, in _load_cluster_name_id
self._lookup_id_from_bucket()
File "/ax/python/ax/meta/cluster_id.py", line 153, in _lookup_id_from_bucket
name, requested_cid = self._format_name_id(self._input_name)
File "/ax/python/ax/meta/cluster_id.py", line 175, in _format_name_id
if Cloud().target_cloud_aws():
File "/ax/python/ax/cloud/cloud.py", line 101, in target_cloud_aws
return self._target_cloud == self.AX_CLOUD_AWS
AttributeError: 'Cloud' object has no attribute '_target_cloud'
2017-08-25T16:14:40 ERROR ax.cluster_management.app.cluster_upgrader MainThread: Command '['upgrade-kubernetes']' returned non-zero exit status 1
Traceback (most recent call last):
File "/ax/python/ax/cluster_management/app/cluster_upgrader.py", line 117, in run
self._upgrade_kube()
File "/ax/python/ax/cluster_management/app/cluster_upgrader.py", line 199, in _upgrade_kube
subprocess.check_call(["upgrade-kubernetes"], env=env)
File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['upgrade-kubernetes']' returned non-zero exit status 1
2017-08-25T16:14:40 ERROR ax.cluster_management.argo_cluster_manager MainThread: Command '['upgrade-kubernetes']' returned non-zero exit status 1
Traceback (most recent call last):
File "/ax/python/ax/cluster_management/argo_cluster_manager.py", line 66, in parse_args_and_run
getattr(self, cmd)(args)
File "/ax/python/ax/cluster_management/argo_cluster_manager.py", line 127, in upgrade
ClusterUpgrader(upgrade_config).run()
File "/ax/python/ax/cluster_management/app/cluster_upgrader.py", line 128, in run
raise RuntimeError(e)
RuntimeError: Command '['upgrade-kubernetes']' returned non-zero exit status 1
!!! Operation failed due to runtime error: Command '['upgrade-kubernetes']' returned non-zero exit status 1