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

Vendor cleanup #2124

Merged
merged 14 commits into from Mar 27, 2019
Merged

Vendor cleanup #2124

merged 14 commits into from Mar 27, 2019

Conversation

vrothberg
Copy link
Member

@vrothberg vrothberg commented Mar 12, 2019

This PR cleans up the vendored dependencies by:

  • forcing make vendor to always fetch the latest version of vndr to avoid divergence
  • pin dependencies that used a branch to releases where possible or commits
  • align the K8s dependencies to the appropriate releases
  • add remaining file changes from vndr which have been forgotten in commits prior to this PR
  • add a hack/tree_status.sh file to check the status of the local git tree
  • enforce clean dependencies in Travis by first running make vendor followed by ./hack/tree_status.sh
  • update libpod and its transitive dependencies
  • fix Travis build

@k8s-ci-robot
Copy link
Contributor

Hi @vrothberg. Thanks for your PR.

I'm waiting for a kubernetes-sigs or kubernetes 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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: yes labels Mar 12, 2019
@vrothberg
Copy link
Member Author

@vrothberg
Copy link
Member Author

The CI seems to go wild on other PRs as well. However, Travis seems happy with the vendor changes. I'd appreciate if we can this PR in before the others to avoid potentially very hairy rebase conflicts.

Copy link
Contributor

@TomSweeneyRedHat TomSweeneyRedHat left a comment

Choose a reason for hiding this comment

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

The changes LGTM, best of luck getting Travis happy.

@vrothberg
Copy link
Member Author

The changes LGTM, best of luck getting Travis happy.

Thanks, Tom! This PR was a bit of a challenge as so many things had to be touched.

@vrothberg
Copy link
Member Author

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 12, 2019
@vrothberg vrothberg force-pushed the vendor-cleanup branch 3 times, most recently from 0612c65 to f9aec36 Compare March 12, 2019 12:08
@vrothberg
Copy link
Member Author

One step further. We're now hitting a runtime error caused by a conflict between go-criu and run:

checkpoint-restore/go-criu#7

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

👍 This cleanup is very great and important in my POV, so I would like to push the topic forward. There are just some small comments/suggestions from my side. Is it still on hold?

@@ -9,12 +9,16 @@ import (
)

func (c *ContainerServer) addSandboxPlatform(sb *sandbox.Sandbox) {
c.state.processLevels[selinux.NewContext(sb.ProcessLabel())["level"]]++
// NewContext() always returns nil, so we can safely ignore the error
ctx, _ := selinux.NewContext(sb.ProcessLabel())
Copy link
Member

Choose a reason for hiding this comment

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

I would still go for the error handling here since I have the feeling that it will be missed when the day comes that selinux.NewContext returns a real error.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, from a maintainability perspective we should catch if there ever becomes an error

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that @rhatdan wants to get rid of those entirely by letting containers/storage handle all label issue but I can update the code now to be on the safe side.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've had a look at the call stack and don't think it's worth the effort. We had to change a whole bunch of APIs up to the ContainerServer which does not really implement error handling (even for {Add,Remove}Container).

I agree that errors shouldn't be ignored but given this affects large parts of the API, I prefer to defer this to a separate PR.

}

func (c *ContainerServer) removeSandboxPlatform(sb *sandbox.Sandbox) {
processLabel := sb.ProcessLabel()
level := selinux.NewContext(processLabel)["level"]
// NewContext() always returns nil, so we can safely ignore the error
ctx, _ := selinux.NewContext(processLabel)
Copy link
Member

Choose a reason for hiding this comment

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

The same for here. Another option would be to revert the selinux-go related changes and put it in a separate PR like this: #2127 WDYT? (If you disagree I will close my PR)

vendor.conf Outdated Show resolved Hide resolved
vendor.conf Outdated Show resolved Hide resolved
vendor.conf Show resolved Hide resolved
@vrothberg
Copy link
Member Author

This cleanup is very great and important in my POV, so I would like to push the topic forward. There are just some small comments/suggestions from my side. Is it still on hold?

Thanks. Yes, it's currently on hold for #2123.

Regarding updating more deps: I prefer deferring that to another PR. This one is quite big already and I consider the first step of a series of commits. Once that's in, the deps are stable and CI will catch regressions.

@vrothberg
Copy link
Member Author

Resuming work. May God have mercy on me while rebasing.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
@vrothberg
Copy link
Member Author

/test kata-containers

1 similar comment
@vrothberg
Copy link
Member Author

/test kata-containers

@vrothberg
Copy link
Member Author

@mrunalp any idea what's going on? Kata seems to go south on other PRs as well.

@rhatdan
Copy link
Contributor

rhatdan commented Mar 26, 2019

Lets leave the SELinux issues to the other PR that @umohnani8 is working on. It is close.

LGTM

@vrothberg
Copy link
Member Author

/test kata-containers

@saschagrunert
Copy link
Member

LGTM, awesome cleanup!

@haircommander
Copy link
Member

/retest

@vrothberg
Copy link
Member Author

/test kata-containers

@vrothberg
Copy link
Member Author

@sboeuf, do you know if the kata job has a hiccup at the moment? Other PRs show similar issues.

@sboeuf
Copy link

sboeuf commented Mar 26, 2019

/cc @chavafg

@k8s-ci-robot
Copy link
Contributor

@sboeuf: GitHub didn't allow me to request PR reviews from the following users: chavafg.

Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @chavafg

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.

@chavafg
Copy link
Contributor

chavafg commented Mar 26, 2019

the error looks pretty weird...

15:09:21 RUNTIME=kata-runtime ./integration/cri-o/cri-o.sh
15:09:21 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Has something change in the way the cri-o tests are run? It is looking for the docker daemon to be running, which we actually stop it before running the tests.

https://github.com/kata-containers/tests/blob/master/integration/cri-o/cri-o.sh#L95-L100

@vrothberg
Copy link
Member Author

Has something change in the way the cri-o tests are run? It is looking for the docker daemon to be running, which we actually stop it before running the tests.

Not to my knowledge. @saschagrunert, as you're the test master, do you have a suspicion?

@saschagrunert
Copy link
Member

saschagrunert commented Mar 26, 2019

On the cri-o side nothing should have changed. @chavafg could the issue related to that part of the logs:

14:58:51 Set to test rootfs image
14:58:51 Add kata-runtime as a new/default Docker runtime.
14:58:51 manage_ctr_mgr.sh - INFO: docker_info: version: 18.06.3-ce
14:58:51 manage_ctr_mgr.sh - INFO: docker_info: default runtime: runc
14:58:51 manage_ctr_mgr.sh - INFO: docker_info: package name: docker-ce
14:58:52 <13>Mar 26 14:58:52 manage_ctr_mgr.sh: configure_docker: configuring kata-runtime as default docker runtime
14:58:52 ls: cannot access '/etc/systemd/system/docker.service.d/': No such file or directory
14:58:52 ls: cannot access '/etc/systemd/system/docker.service.d/': No such file or directory
14:58:52 Stopping the docker service
14:58:53 Removing /var/lib/docker
14:58:53 Changing docker service configuration
14:58:53 [Service]
14:58:53 Environment=""
14:58:53 Environment=""
14:58:53 ExecStart=
14:58:53 ExecStart=/usr/bin/dockerd -D --add-runtime kata-runtime=/usr/local/bin/kata-runtime --default-runtime=kata-runtime --storage-driver=overlay2
14:58:53 Reloading unit files and starting docker service
14:59:10 Script finished

I think the docker service does not start correctly but is listed as systemd state active. So shutting down docker does not work in that case.

@chavafg
Copy link
Contributor

chavafg commented Mar 26, 2019

sorry, found the issue. One of our functions in .ci/lib.sh was trying to access docker, but it was already stopped. I removed the part where we were stopping the docker service on our jenkins job.
Should be fixed now, can you restart the job?

@haircommander
Copy link
Member

haircommander commented Mar 26, 2019

Thanks @chavafg

@haircommander
Copy link
Member

/retest

@vrothberg
Copy link
Member Author

Thanks a lot folks :)

@haircommander
Copy link
Member

LGTM @umohnani8 @mrunalp PTAL

@vrothberg
Copy link
Member Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 27, 2019
@giuseppe
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 27, 2019
@giuseppe
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe, vrothberg

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 27, 2019
@k8s-ci-robot k8s-ci-robot merged commit f4c2ffb into cri-o:master Mar 27, 2019
@vrothberg vrothberg deleted the vendor-cleanup branch March 27, 2019 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet