Bug in Juju Deployment with conjure up for GCP


#1

We were deploying kuberentes on Google could platform using conjure up. During deployment, we ran into the following problem using the gcp-integrator and kubernetes master :

unit it-gcp-integrator-0: 10:07:27 INFO unit.gcp-integrator/0.juju-log Labelling instance juju-5c0559-9 in europe-west1-b with: {'juju.io/az': 'europe-west1-b', 'juju.io/cloud': 'gce', 'k8s-io-cluster-name': 'kubernetes-t1rxbmojkn8tkr3vouaig2hocl8nn53p'}
unit-gcp-integrator-0: 10:07:29 ERROR unit.gcp-integrator/0.juju-log Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-gcp-integrator-0/charm/reactive/gcp.py", line 68, in handle_requests
    request.instance_labels)
  File "lib/charms/layer/gcp.py", line 125, in label_instance
    '--labels', ','.join('='.join([k, v]) for k, v in labels.items()))
  File "lib/charms/layer/gcp.py", line 253, in _gcloud
    raise GCPError(stderr)
charms.layer.gcp.GCPError: ERROR: (gcloud.compute.instances.add-labels) HTTPError 400: Invalid value for field 'labels': ''. Label key 'juju.io/az' violates format constraints. The key must start with a lowercase character, can only contain lowercase letters, numeric characters, underscores and dashes. The key can be at most 63 characters long. International characters are allowed.

I am more than willing to help fix it, I would like some help so that I do not need to go blindly into the whole repository of juju/conjure-up


#2

It looks like this is where the code is running:
https://github.com/juju-solutions/charm-gcp-integrator/blob/master/reactive/gcp.py#L68

This is part of the GCP integrator charm:


#3

Hi @andrewvd, thanks for reporting this.

I think this is the offending commit: https://github.com/charmed-kubernetes/charm-kubernetes-worker/commit/cb3d6a53c8e932b8a583587ea8abf3c6bee21a63

Regardless of who fixes this, would you mind filing a bug at https://bugs.launchpad.net/charmed-kubernetes so we can track it? You can just copy-paste what you described here. Thanks!

cc @cory_fu