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

Do not call "bash -c" unnecessarily as entry points #249

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ralonsoh
Copy link
Contributor

@ralonsoh ralonsoh commented Mar 14, 2024

Closes: OSPRH-680

Copy link
Contributor

openshift-ci bot commented Mar 14, 2024

Hi @ralonsoh. Thanks for your PR.

I'm waiting for a openstack-k8s-operators member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://review.rdoproject.org/zuul/buildset/9babb1ba4c57454b90662c4b937fe4e1

openstack-k8s-operators-content-provider FAILURE in 6m 31s
⚠️ ovn-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@booxter
Copy link
Contributor

booxter commented Mar 14, 2024

/ok-to-test

@@ -131,14 +131,11 @@ func DaemonSet(
}

ovnControllerCmd = []string{
"/bin/bash", "-c",
"/usr/local/bin/container-scripts/net_setup.sh && ovn-controller",
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this will work, because && is handled by shell.

}
ovnControllerArgs = []string{
strings.Join(
append(
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like this doesn't compile, as per CI

Copy link
Contributor

@booxter booxter left a comment

Choose a reason for hiding this comment

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

Doesn't compile, and I think you have to have a shell to do &&. Either we find a different way to do setup (with job / preStart hook), or have a script that would start ovn-controller for us; or do nothing.

Copy link
Contributor

openshift-ci bot commented Sep 13, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ralonsoh
Once this PR has been reviewed and has the lgtm label, please ask for approval from booxter. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/60351f5760564d2abd0ab6157bf18ff7

openstack-k8s-operators-content-provider FAILURE in 7m 24s
⚠️ ovn-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/be180f1f13d442338835c25e16a81413

openstack-k8s-operators-content-provider FAILURE in 7m 07s
⚠️ ovn-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/51e9fd937426432f92e76762194c3b1b

openstack-k8s-operators-content-provider FAILURE in 8m 55s
⚠️ ovn-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@ralonsoh
Copy link
Contributor Author

@booxter @karelyatin @slawqo I think this patch is ready for review, thanks in advance.

@karelyatin
Copy link
Contributor

@ralonsoh LGTM for the changes done here, but the linked but also mentions about bash usage in ovncontroller but i don't see any changes/comment for that either in PR or in Jira and also the comment says Closes Jira.

@ralonsoh
Copy link
Contributor Author

@ralonsoh LGTM for the changes done here, but the linked but also mentions about bash usage in ovncontroller but i don't see any changes/comment for that either in PR or in Jira and also the comment says Closes Jira.

@karelyatin when the ovn-controller command [1] is executed outside the bash call, it always returns an error with the socket file. Also when dumb-init is used. The directory /run/openvswitch exists. E.g.:

ospng@r7rhoso:~/ovn-operator$ oc logs pods/$p -n kuttl3                                                                                                                                                                                                     
[dumb-init] ovn-controller --pidfile unix:/run/openvswitch/db.sock: No such file or directory

[1]https://github.com/openstack-k8s-operators/ovn-operator/blob/9bdb826b7218c51a029b8c213850022a70cea4fd/pkg/ovncontroller/daemonset.go#L39C4-L39C18

@karelyatin
Copy link
Contributor

karelyatin commented Sep 17, 2024

@ralonsoh LGTM for the changes done here, but the linked but also mentions about bash usage in ovncontroller but i don't see any changes/comment for that either in PR or in Jira and also the comment says Closes Jira.

@karelyatin when the ovn-controller command [1] is executed outside the bash call, it always returns an error with the socket file. Also when dumb-init is used. The directory /run/openvswitch exists. E.g.:

ospng@r7rhoso:~/ovn-operator$ oc logs pods/$p -n kuttl3                                                                                                                                                                                                     
[dumb-init] ovn-controller --pidfile unix:/run/openvswitch/db.sock: No such file or directory

[1]https://github.com/openstack-k8s-operators/ovn-operator/blob/9bdb826b7218c51a029b8c213850022a70cea4fd/pkg/ovncontroller/daemonset.go#L39C4-L39C18

@ralonsoh but dumb-init shouldn't be needed just for this, i did tried locally removing bash and seems to work.
https://paste.opendev.org/show/bcDn2u4DRCaMbNqnJvfk/

@ralonsoh
Copy link
Contributor Author

@ralonsoh but dumb-init shouldn't be needed just for this, i did tried locally removing bash and seems to work. https://paste.opendev.org/show/bcDn2u4DRCaMbNqnJvfk/

I did something similar some PS ago [1] and it wasn't working. The problem was to divide the command string... Thanks for your help.

[1]40f649e#diff-853730e1a0e56623824bb603929544f54d838010a75b27a62b285ae738064744

Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/86d0858cda2a4117908ca694ce919b3c

openstack-k8s-operators-content-provider FAILURE in 7m 35s
⚠️ ovn-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@ralonsoh
Copy link
Contributor Author

/retest-required

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