-
Notifications
You must be signed in to change notification settings - Fork 241
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
Experimental kind podman support for hive development. #982
Conversation
hack/create-kind-podman-cluster.sh
Outdated
|
||
# create registry container unless it already exists | ||
reg_name='kind-podman-registry' | ||
reg_port='5001' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be 5000 I'm just testing along side docker at the moment.
|
||
sudo cp /root/.kube/config ~/.kube/${cluster_name}.kubeconfig | ||
sudo chown $USER ~/.kube/${cluster_name}.kubeconfig | ||
echo "Kubeconfig written to $HOME/.kube/${cluster_name}.kubeconfig" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could probably be better...
Current status, this gets hive running but we cannot launch an install, podman will not let us exec/fork to run openshift-install in our install pods, because the binary is copied into /output by the sidecar container and this is mounted with noexec. Could we perhaps copy to /bin in installmanager? cc @joelddiaz |
I'd like to spend some time with the kind/docker setup to compare with how things are being brought up there compared to the kind/podman setup. But certainly moving the binary to mountpoint that isn't noexec will work around the immedate issue. |
Commit added to copy the binaries to /bin. This is working for me locally, I have an install running now. |
Wonder if we should have a copy retry:
|
I have added a commit which copies the binaries to /home/ where we have a homedir and permissions to write/run. This seems to be working fine. However it looks like kind and or podman will be fixing the noexec in a future release. I would still propose we just merge this change to run from /home as it works fine and gets us kind+podman in the meantime. |
|
||
return destTarball, nil | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was dead code.
Reverted the 5001 port back to 5000. |
+1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this worked well for me. i look forward to being able to upgrade to fedora 32 when this merges...
Multiple testers, I think we're good to go with this one. |
pkg/installmanager/installmanager.go
Outdated
fileList := []string{ | ||
filepath.Join(m.WorkDir, "openshift-install"), | ||
filepath.Join(m.WorkDir, "oc"), | ||
} | ||
m.waitForFiles(fileList) | ||
|
||
// copy each binary to /bin to avoid situations where the workdir may be mounted with noexec. | ||
// (i.e. kind + podman) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you trying to say that "kind + podman" is the situation or an example of a situation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was originally meant to be an example. Clarifying a little bit.
pkg/installmanager/installmanager.go
Outdated
@@ -466,12 +471,32 @@ func (m *InstallManager) waitForFiles(files []string) { | |||
m.log.Infof("all files found, ready to proceed") | |||
} | |||
|
|||
func (m *InstallManager) waitForInstallerBinaries() { | |||
func (m *InstallManager) waitForInstallerBinaries() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of this function should be changed. It is doing more than just waiting for binaries now. It would seem that its main purpose now is to copying the binaries to the needed location.
hack/create-kind-podman-cluster.sh
Outdated
# This script creates a kind cluster and configures it to use an insecure registry | ||
# running on the host OS. | ||
# | ||
# USAGE: sudo DEV_USER=myusername ./hack/create-kind-cluster-podman.sh [cluster_name] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the advice about using sudo
and DEV_USER
left over from a previous iteration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes good catch thanks. Switched to in-script sudo so it could more easily get you a kubeconfig you could use as a non-root user.
/output is getting mounted with noexec in this environment and thus we quickly fail all provisions as we can't run the openshift-install binary. Copy the binaries to /home/hive as soon as we see they've been written to /output where we know we can exec them. Uses cp vs any Go copy just for simplicity and to avoid memory problems.
Updated! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good to me. But I have not tested it personally where I know others have, so I will refrain from giving a /lgtm.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dgoodwin, joelddiaz The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
No description provided.