atomicapp icon indicating copy to clipboard operation
atomicapp copied to clipboard

openshift: make sure namespace value gets back into config

Open dustymabe opened this issue 9 years ago • 1 comments

If I run and my answers.conf doesn't have a namespace=default in it then the namespace from the providerconfig (if provided) will be used. We need to make sure the namespace that gets used gets put back in the config so that the written out answers.conf.gen file will have it. If we don't then when we try to run a stop we will see an error because the wrong value for namespace got put in answers.conf.gen:

[root@f23 etherpad-centos7-atomicapp (master *%>)]# aa stop ./
2016-01-07 15:07:56,061 - __main__ - INFO - Action/Mode Selected is: stop
2016-01-07 15:07:56,082 - atomicapp.nulecule.base - INFO - Found existing external application for mariadb-centos7-atomicapp. Loading it.
2016-01-07 15:07:56,133 - openshift - ERROR - There are conflicting values in /host/root/.kube/config (proj1) and answers.conf (default)
2016-01-07 15:07:56,133 - __main__ - ERROR - There are conflicting values in /host/root/.kube/config (proj1) and answers.conf (default)
Traceback (most recent call last):
  File "/opt/atomicapp/atomicapp/cli/main.py", line 118, in cli_stop
    nm.stop(**argdict)
  File "/opt/atomicapp/atomicapp/nulecule/main.py", line 272, in stop
    self.nulecule.stop(cli_provider, dryrun)
  File "/opt/atomicapp/atomicapp/nulecule/base.py", line 153, in stop
    component.stop(provider_key, dryrun)
  File "/opt/atomicapp/atomicapp/nulecule/base.py", line 272, in stop
    self._app.stop(provider_key, dryrun)
  File "/opt/atomicapp/atomicapp/nulecule/base.py", line 153, in stop
    component.stop(provider_key, dryrun)
  File "/opt/atomicapp/atomicapp/nulecule/base.py", line 276, in stop
    provider.init()
  File "/opt/atomicapp/atomicapp/providers/openshift.py", line 157, in init
    self._get_config_values()
  File "/opt/atomicapp/atomicapp/providers/openshift.py", line 566, in _get_config_values
    raise ProviderFailedException(msg)
ProviderFailedException: There are conflicting values in /host/root/.kube/config (proj1) and answers.conf (default)

dustymabe avatar Jan 07 '16 15:01 dustymabe

We merged a workaround in #538 but we are leaving this bug open because it is not a pure solution.

dustymabe avatar Feb 10 '16 23:02 dustymabe