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

[opendaylight] Update directory for openDaylight logs #1438

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions sos/plugins/opendaylight.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,27 @@ def setup(self):
])

if self.get_option("all_logs"):

# /var/log/containers/opendaylight/ path is specific to ODL
# Oxygen-SR3 and earlier versions, and may be removed in a future
# update.

self.add_copy_spec([
"/opt/opendaylight/data/log/",
"/var/log/containers/opendaylight/",
"/var/log/containers/opendaylight/karaf/logs/",
Copy link
Contributor

Choose a reason for hiding this comment

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

This change means restriction in logs collected - is that intentional? Currently (when --all-logs option is used), whole directory /var/log/containers/opendaylight/ is collected. You request collecting just subdirectory here? (could be reasonable, just want to be sure it is the intention)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is intentional. All ODL logs are now under /var/log/containers/opendaylight/karaf/logs. For example, we would have:

/var/log/containers/opendaylight/karaf/logs/karaf.log
/var/log/containers/opendaylight/karaf/logs/karaf.log.1

Whereas before, all ODL logs would be:

/var/log/containers/opendaylight/karaf.log
/var/log/containers/opendaylight/karaf.log.1

])

else:

# /var/log/containers/opendaylight/ path is specific to ODL
# Oxygen-SR3 and earlier versions, and may be removed in a future
# update.

self.add_copy_spec([
"/opt/opendaylight/data/log/*.log*",
"/var/log/containers/opendaylight/*.log*",
"/var/log/containers/opendaylight/karaf/logs/*.log*",
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess the above change and also this one is triggered by moving the logfiles of interest from /var/log/containers/opendaylight/ to /var/log/containers/opendaylight/karaf/logs dir - if I am right, the change makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, exactly. Thanks.

])

self.add_cmd_output("docker logs opendaylight_api")
Expand Down