Open addyess opened 2 years ago
here's the juju status
for the model:
❯ juju status --format yaml
model:
name: test-kubernetes-metrics-server-krgf
type: caas
controller: addyess-vsphere
cloud: k8s-cloud
region: default
version: 2.9.28
model-status:
current: destroying
message: 'attempt 5 to destroy model failed (will retry): model not empty, found
1 application (model not empty)'
since: 28 Apr 2022 14:28:28-05:00
sla: unsupported
machines: {}
applications:
prometheus:
charm: prometheus-k8s
series: kubernetes
os: kubernetes
charm-origin: charmhub
charm-name: prometheus-k8s
charm-rev: 20
charm-channel: beta
scale: 1
exposed: false
life: dying
application-status:
current: error
message: 'StorageClass.storage.k8s.io "test-kubernetes-metrics-server-krgf-"
is invalid: [metadata.name: Invalid value: "test-kubernetes-metrics-server-krgf-":
a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters,
''-'' or ''.'', and must start and end with an alphanumeric character (e.g.
''example.com'', regex used for validation is ''[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*''),
provisioner: Required value]'
since: 28 Apr 2022 11:46:47-05:00
units:
prometheus/0:
workload-status:
current: waiting
message: installing agent
juju-status:
current: allocating
since: 28 Apr 2022 11:46:42-05:00
endpoint-bindings:
"": alpha
alertmanager: alpha
grafana-source: alpha
ingress: alpha
metrics-endpoint: alpha
prometheus-peers: alpha
receive-remote-write: alpha
storage: {}
controller:
timestamp: 14:47:53-05:00
trouble seems to be here
def run_addons(self):
services = service_unit_addresses(self.status)
machines = services.keys()
units = [v for v in list(set.union(*list(services.values()))) if "/" in v]
if not machines:
return
might should be:
def run_addons(self):
services = service_unit_addresses(self.status)
machines = services.keys()
if not machines:
return
units = [v for v in list(set.union(*list(services.values()))) if "/" in v]
seems like it was introduced in this commit https://github.com/juju/juju-crashdump/commit/db5f663ecbfd17b3b4f8f414fa54fd9c41d6437b
Thanks @addyess!
The problem goes a little deeper unfortunately.
It looks like service_unit_addresses
assumes that the units have a public address, which is not the case if the machine is still allocating. For specific addons it is still nice if we get a list of units.
I will push the previous version back to stable to unblock you and fix this problem tomorrow.
oh... don't goto to too much trouble on my account. Fix at your leisure
i'm GUESSING that
list(services.values())
is empty?