Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

microk8s just broke chectl -p microk8s #16408

Closed
TheRealChssAddct opened this issue Mar 20, 2020 · 6 comments
Closed

microk8s just broke chectl -p microk8s #16408

TheRealChssAddct opened this issue Mar 20, 2020 · 6 comments
Labels
area/chectl Issues related to chectl, the CLI of Che kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@TheRealChssAddct
Copy link

TheRealChssAddct commented Mar 20, 2020

Microk8s team decided to 'pretty up' the output of microk8s.status. It released today (2020-03-19) on the latest/edge channel with v1.17.4 rev: 1278.

The PR is here: here

Their changes break the ingress and storage enabled checks in chectl/src/tasks/platforms/microk8s.ts lines 112 and 113.

      ingress: stdout.includes('ingress: enabled'),
      storage: stdout.includes('storage: enabled')

With their change it is less simple to get the array of enabled addons. There is the option to get yaml output which is still parsable, but less simply than currently done in the code above. e.g.:
microk8s status -o yaml

They also added a --addon tag, for querying the status of an individual addon and returns either "enabled" or "disabled". e.g.:
microk8s.status --addon ingress
microk8s.status --addon storage

For now, I can switch to another channel such as latest/stable, latest/candidate, or latest/beta. But this breaking change is coming fast. (latest/stable is dated 1020-03-09).

I submit a bug to microk8s canonical/microk8s#1041 complaining and suggesting they keep the old format as default and provide the new format with a new switch such as --pretty or -o pretty But no guarantees they would accomodate.

@TheRealChssAddct TheRealChssAddct changed the title microk8s just released a breaking change to chectl -p microk8s microk8s just broke chectl -p microk8s Mar 20, 2020
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Mar 20, 2020
@tolusha
Copy link
Contributor

tolusha commented Mar 20, 2020

@TheRealChssAddct
Thank you for reporting

@tolusha tolusha added area/chectl Issues related to chectl, the CLI of Che severity/P1 Has a major impact to usage or development of the system. kind/bug Outline of a bug - must adhere to the bug report template. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Mar 20, 2020
@tolusha tolusha added this to the Backlog - Deploy milestone Mar 20, 2020
ktsakalozos added a commit to canonical/microk8s that referenced this issue Mar 20, 2020
With this PR we maintain the old CLI interface and out put for microk8s.status and microk8s.status --yaml.

We introduce a --format argument with which you can select a human readable pretty output format (that includes the addon descriptions) or select the new yaml format with yaml

Fixes: #1041 and eclipse-che/che#16408
@ktsakalozos
Copy link

@tolusha @TheRealChssAddct we have taken corrective action in MicroK8s in order not to change the CLI and output format. The PR with the fix is merged and the edge channel should be updated within a few hours. Thank you for reporting this, apologies for any inconvenience.

@TheRealChssAddct
Copy link
Author

Problem resolved by microk8s team.

@tolusha
Copy link
Contributor

tolusha commented Mar 21, 2020

@ktsakalozos Cool, thank you!

@tolusha tolusha removed this from the Backlog - Deploy milestone Mar 21, 2020
@TheRealChssAddct
Copy link
Author

TheRealChssAddct commented Oct 2, 2020

Reopening, because the microk8s team has decided (canonical/microk8s#1041 (comment)) to have the default of microk8s.status be 'pretty'.

This is a breaking change for chectl (on microk8s). It can't be ignored.

The fix will be in src/tasks/platforms/microk8s.ts. Line 113 needs to include '--format short'

const { stdout } = await execa('microk8s.status', [], { timeout: 10000 })

in order for lines 115,116 to find the expected output:

ingress: stdout.includes('ingress: enabled'),
storage: stdout.includes('storage: enabled')

alternatively, as I mentioned in my original description above, the following could be used.

microk8s.status --addon ingress
microk8s.status --addon storage

It is unfortunate that it will in fact break everyone who is using an older version of chectl if their microk8s snap auto updates to the latest with the breaking change.
Anyone who uses older versions of chectl from before this is fixed, will have to manually be an a previous version of microk8s (or use something other than microk8s which chectl supports, such as minikube, etc.)

@tolusha
Copy link
Contributor

tolusha commented Oct 5, 2020

@TheRealChssAddct
Thank you for reporting.
Do you think you can submit a PR ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/chectl Issues related to chectl, the CLI of Che kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

4 participants