Comment 2 for bug 1430413

Tom Haddon (mthaddon) wrote :

Ok, so the problem appears to be with the 'OPENSSL_CN' variable. In the old version of the charm this corresponds to the IP address of the unit, in the newer version it's empty. It's set as follows:

os.environ['OPENSSL_CN'] = config['servername']

Here's the difference in that function between the two versions of charmhelpers:

 def config(scope=None):
- "Juju charm configuration"
+ """Juju charm configuration"""
     config_cmd_line = ['config-get']
     if scope is not None:
- return json.loads(subprocess.check_output(config_cmd_line))
+ config_data = json.loads(
+ subprocess.check_output(config_cmd_line).decode('UTF-8'))
+ if scope is not None:
+ return config_data
+ return Config(config_data)
     except ValueError:
         return None