KeyError: 'SHELL' while running cluster-config

Bug #1634981 reported by Tushar Karkera
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Magnum
New
Undecided
Unassigned

Bug Description

Hi, I have a newton environment with a kubernetes cluster deployed on coreos. On running "cluster-config" to setup the environment and artifacts for TLS it returns an error with below traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/magnumclient/shell.py", line 691, in main
    OpenStackMagnumShell().main(map(encodeutils.safe_decode, sys.argv[1:]))
  File "/usr/lib/python2.7/site-packages/magnumclient/shell.py", line 633, in main
    args.func(self.cs, args)
  File "/usr/lib/python2.7/site-packages/magnumclient/v1/clusters_shell.py", line 227, in do_cluster_config
    cfg_dir=args.dir, force=args.force))
  File "/usr/lib/python2.7/site-packages/magnumclient/v1/clusters_shell.py", line 234, in _config_cluster
    cfg_dir, force)
  File "/usr/lib/python2.7/site-packages/magnumclient/v1/clusters_shell.py", line 288, in _config_cluster_kubernetes
    if 'csh' in os.environ['SHELL']:
  File "/usr/lib64/python2.7/UserDict.py", line 23, in __getitem__
    raise KeyError(key)
KeyError: 'SHELL'
ERROR: 'SHELL'

Although the command returns an error, the cert files are generated under the specified folder.

Note: This is seen in an environment where Magnum is running inside a container, so this might not be seen in every environment.

description: updated
Revision history for this message
Abhishek Chanda (abhishek-i) wrote :

A workaround is to export SHELL in the environment

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.