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

Fix installer Ubuntu_20.04.3_x86-64 bug #243

Merged
merged 2 commits into from
Nov 17, 2021

Conversation

ratanasovvmw
Copy link
Contributor

@ratanasovvmw ratanasovvmw commented Nov 15, 2021

Problem
When running cli with os flag set to "Ubuntu_20.04.3_x86-64", installer returns
"os k8s not supported". Installer is expected to support Ubuntu_20.04.*_x86-64
and treat them as Ubuntu_20.04.1_x86-64.

Rootcause
Installer runs a check whether there is at least one k8s for the os.
It does so by using registry ListK8s. However the latter expects that
its argument is an osBundle (Ubuntu_20.04.1_x86-64) as returned by
registry ListOS. There is no os bundle for "Ubuntu_20.04.3_x86-64".

Fix
registry ListK8s needs to support 2 use-cases. First, when called
with an actual OS to be mutated. Second, when called with list-supported
which may be on a non supported OS. Extend registry ListK8s to use the os
regex in addition to the os bundle. Extend registry to return the os bundle
in addition to installer.

Problem
When running cli with os flag set to "Ubuntu_20.04.3_x86-64", installer returns
"os k8s not supported". Installer is expected to support Ubuntu_20.04.*_x86-64
and treat them as Ubuntu_20.04.1_x86-64.

Rootcause
Installer runs a check whether there is at least one k8s for the os.
It does so by using registry ListK8s. However the latter expects that
its argument is an osBundle (Ubuntu_20.04.1_x86-64) as returned by
registry ListOS. There is no os bundle for "Ubuntu_20.04.3_x86-64".

Fix
registry ListK8s needs to support 2 use-cases. First, when called
with an actual OS to be mutated. Second, when called with list-supported
which may be on a non supported OS. Extend registry ListK8s to use the os
regex in addition to the os bundle. Extend registry to return the os bundle
in addition to installer.
Copy link
Contributor

@dharmjit dharmjit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, some nits only.

agent/installer/registry.go Show resolved Hide resolved
agent/installer/registry.go Show resolved Hide resolved
agent/installer/registry.go Show resolved Hide resolved
agent/installer/registry.go Show resolved Hide resolved
agent/installer/installer.go Show resolved Hide resolved
Copy link
Contributor

@dharmjit dharmjit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@anusha94 anusha94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this branch on a Ubuntu 20.04.3 vm and looks good to me.
Used this command - sudo ./installer-cli -install -bundle-repo <repo_addr> -tag <tag_name> -k8s v1.22.3

@dharmjit dharmjit merged commit 29c5b06 into vmware-tanzu:main Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants