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

Handle "origin" container like a k8s container on cleanup #13952

Merged

Conversation

stevekuznetsov
Copy link
Contributor

Remove Docker journal gathering steps

The job scripts we use to wrap tests in Jenkins will gather the docker
system journal where necessary, so we do not need to be gathering it as
well explicitly in the test scripts themselves.

Signed-off-by: Steve Kuznetsov [email protected]


Handle "origin" container like a k8s container on cleanup

When we start the master using oc cluster up, we run a container
called "origin" that was previously not being considered a container
we needed to be getting logs for or stopping and cleaning up. We should
consider this container the same as any other and not have custom logic
for it.

Signed-off-by: Steve Kuznetsov [email protected]


Fixes #13949

@ncdc PTAL

When we start the master using `oc cluster up`, we run a container
called "origin" that was previously not being considered a container
we needed to be getting logs for or stopping and cleaning up. We should
consider this container the same as any other and not have custom logic
for it.

Signed-off-by: Steve Kuznetsov <[email protected]>
@stevekuznetsov
Copy link
Contributor Author

[test]

@@ -86,18 +101,33 @@ readonly -f os::cleanup::dump_container_logs
# Returns:
# None
function os::cleanup::internal::list_k8s_containers() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have some downstream users of this code, could remove this func but didn't want to be backwards incompatible in case someone was using it directly.

@stevekuznetsov stevekuznetsov changed the title Skuznets/cluster up logs Handle "origin" container like a k8s container on cleanup Apr 28, 2017
# os::cleanup::internal::list_k8s_containers returns a space-delimited list of
# docker containers that belonged to k8s.
# docker containers that belonging to k8s.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure you want this grammatically incorrect change? :-p

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whoa. embarrassing

local name; name="$( docker inspect --format '{{ .Name }}' "${id}" )"
os::log::debug "Dumping logs for ${id} to ${name}.log"
docker logs "${id}" >"${container_log_dir}/${name}.log" 2>&1
done
}
readonly -f os::cleanup::dump_container_logs

# os::cleanup::internal::list_our_containers returns a space-delimited list of
# docker containers that belonging to some part of the Origin deployment.
Copy link
Contributor

Choose a reason for hiding this comment

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

"that belonging" again

@ncdc
Copy link
Contributor

ncdc commented Apr 28, 2017

Other than some grammar, LGTM

The job scripts we use to wrap tests in Jenkins will gather the `docker`
system journal where necessary, so we do not need to be gathering it as
well explicitly in the test scripts themselves.

Signed-off-by: Steve Kuznetsov <[email protected]>
@stevekuznetsov stevekuznetsov force-pushed the skuznets/cluster-up-logs branch from b8057fd to dacfb85 Compare April 28, 2017 18:36
@stevekuznetsov
Copy link
Contributor Author

Updated grammar. [merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to dacfb85

@ncdc
Copy link
Contributor

ncdc commented Apr 28, 2017

#13942 [test]

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to dacfb85

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/1050/) (Base Commit: 03beec0)

@openshift-bot
Copy link
Contributor

openshift-bot commented Apr 29, 2017

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/520/) (Base Commit: fed098c) (Image: devenv-rhel7_6189)

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

Successfully merging this pull request may close these issues.

3 participants