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

Incorrect templating of shim container #76

Open
surskitt opened this issue May 27, 2021 · 10 comments
Open

Incorrect templating of shim container #76

surskitt opened this issue May 27, 2021 · 10 comments

Comments

@surskitt
Copy link
Contributor

I am seeing the error below when trying to run launchpad with a private repo:

unable to run install step \"Deploy Kubelet\": unable to reconcile state of Kubelet component: unable to reconcile persistent state: image \"docker.io/repo.shanedabes.com/mirantis/ucp-containerd-shim-process:3.3.8\": not found

It looks like the templating of the image isn't working properly, the above should be repo.shanedabes.com/mirantis... instead of docker.io/repo.shanedabes.com/mirantis. This starts happening when trying to install MKE versions 3.3.8 and up, it's not seen on versions lower than that.

I am on the newest stable release of launchpad.

Thanks!

@surskitt
Copy link
Contributor Author

surskitt commented Jun 2, 2021

Any update on whether this can be looked at? It's preventing us using launchpad to upgrade to versions 3.3.8 and up like mentioned.

@kke
Copy link
Contributor

kke commented Jun 10, 2021

What do you have in imageRepo: in config? I have a hunch it may have some problems if it doesn't include an "organization" part (eg. just repo.example.com instead of repo.example.com/mirantis).

Could you find lines containing retag in the debug log (can be found in ~/.mirantis-launchpad/cluster/<cluster_name>/apply.log) or viewed during apply with --debug and paste a couple of them for example? (something like DEBU 00:00:00 retag mirantis/foofoo --> customrepo/foofoo)

@surskitt
Copy link
Contributor Author

surskitt commented Jun 10, 2021

The imagerepo line is like the below:

"imageRepo": "nexus-rm.private.co.uk:9026/mirantis"

@surskitt
Copy link
Contributor Author

Here's some examples of the retag happening, including the shim process container:

time="10 Jun 21 14:13 BST" level=debug msg="[ssh] cmpwkr302.devtech.private.co.uk:22: retag nexus-rm.private.co.uk:9026/mirantis/ucp-calico-cni:3.3.9 --> nexus-rm.private.co.uk:9026/mirantis/ucp-calico-cni:3.3.9"
time="10 Jun 21 14:13 BST" level=debug msg="[ssh] cmpwkr301.devtech.private.co.uk:22: retag nexus-rm.private.co.uk:9026/mirantis/ucp-compose:3.3.9 --> nexus-rm.private.co.uk:9026/mirantis/ucp-compose:3.3.9"
time="10 Jun 21 14:13 BST" level=debug msg="[ssh] cmpwkr300.devtech.private.co.uk:22: retag nexus-rm.private.co.uk:9026/mirantis/ucp-containerd-shim-process:3.3.9 --> nexus-rm.private.co.uk:9026/mirantis/ucp-containerd-shim-process:3.3.9"
time="10 Jun 21 14:13 BST" level=debug msg="[ssh] cmpwkr302.devtech.private.co.uk:22: retag nexus-rm.private.co.uk:9026/mirantis/ucp-calico-kube-controllers:3.3.9 --> nexus-rm.private.co.uk:9026/mirantis/ucp-calico-kube-controllers:3.3.9"
time="10 Jun 21 14:13 BST" level=debug msg="[ssh] cmpwkr301.devtech.private.co.uk:22: retag nexus-rm.private.co.uk:9026/mirantis/ucp-containerd-shim-process:3.3.9 --> nexus-rm.private.co.uk:9026/mirantis/ucp-containerd-shim-process:3.3.9"
time="10 Jun 21 14:13 BST" level=debug msg="[ssh] cmpwkr300.devtech.private.co.uk:22: retag nexus-rm.private.co.uk:9026/mirantis/ucp-controller:3.3.9 --> nexus-rm.private.co.uk:9026/mirantis/ucp-controller:3.3.9"
time="10 Jun 21 14:13 BST" level=debug msg="[ssh] cmpwkr302.devtech.private.co.uk:22: retag nexus-rm.private.co.uk:9026/mirantis/ucp-calico-node:3.3.9 --> nexus-rm.private.co.uk:9026/mirantis/ucp-calico-node:3.3.9"

@kke
Copy link
Contributor

kke commented Jun 11, 2021

Ok, that looks correct. I think this may be a problem in the MKE itself. Investigation on-going, reporting back asap.

@kke
Copy link
Contributor

kke commented Jun 24, 2021

@vikramhh / @ankolesnikov any follow-up on this?

@vikramhh
Copy link

@AlexShu88
Copy link

@vikramhh , not sure why after running this code https://github.com/Mirantis/orca/blob/7d07ecd9aa0a3d6a3e6b2cef0092810e61067f69/agent2/reconciler/image_util.go#L60
the docker-io prefix was automatically added before the imag name.

@AlexShu88
Copy link

@byDimasik, would you please confirm if this function should be modified to check if this hostname is included in the Org.
https://github.com/Mirantis/orca/blob/7d07ecd9aa0a3d6a3e6b2cef0092810e61067f69/utils/imageref.go#L22

func LocalPlatformImageRef(repoName, version, org string) string { var ( tag = version repoNamespace = config.ImageOrg )
if org != ""
{
judge if org has host name,
if ture
replacing the host name with docker.io
otherwise
repoNamespace = org

	}
if runtime.GOOS == constants.OSWindows {		windowsRepoName, ok := windowsRepoNames[repoName]		if ok {			repoName = windowsRepoName		}	}
return fmt.Sprintf("%s/%s:%s", repoNamespace, repoName, tag)}

@byDimasik
Copy link

Yeah. Seems it should work. Probably, just need one more check for repoNamespace before the return

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants