Charm uses hostnamectl json format args which don't exist on focal

Bug #2046456 reported by Adam Dyess
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Kubernetes Control Plane Charm
Fix Released
Critical
Adam Dyess
Kubernetes Worker Charm
Fix Released
Critical
Adam Dyess

Bug Description

When detecting the underlying cloud

hostnamectl: unrecognized option '--json=short'

--- during this situation, the error handling code fails to log the error correctly.

        try:
            hostnamectl = check_output(["hostnamectl", "--json=short"])
        except CalledProcessError as e:
- log.warning("hostnamectl failure", e)
+ log.warning("hostnamectl failure: %s", e)
            return None

is the required minimum, but new logic must be employed to find the correct values from hostnamectl

Revision history for this message
Adam Dyess (addyess) wrote :

Works fine in jammy, but fails in focal due to lack of arguments

Changed in charm-kubernetes-master:
milestone: none → 1.29
Changed in charm-kubernetes-worker:
milestone: none → 1.29
Changed in charm-kubernetes-master:
assignee: nobody → Adam Dyess (addyess)
Changed in charm-kubernetes-worker:
assignee: nobody → Adam Dyess (addyess)
Changed in charm-kubernetes-master:
importance: Undecided → Critical
Changed in charm-kubernetes-worker:
importance: Undecided → Critical
Revision history for this message
Adam Dyess (addyess) wrote :
tags: added: backport-needed
Revision history for this message
Adam Dyess (addyess) wrote :
Changed in charm-kubernetes-master:
status: New → Fix Committed
Changed in charm-kubernetes-worker:
status: New → Fix Committed
tags: removed: backport-needed
Revision history for this message
Adam Dyess (addyess) wrote :
Changed in charm-kubernetes-master:
status: Fix Committed → Fix Released
Changed in charm-kubernetes-worker:
status: Fix Committed → Fix Released
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.