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 errors while mounting cgroup controllers #1573

Merged
merged 1 commit into from
Jul 2, 2019

Conversation

narrieta
Copy link
Member

@narrieta narrieta commented Jul 2, 2019

If specific controller fails to mount we need to continue with the other controllers


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and Travis.CI is passing.

Quality of Code and Contribution Guidelines


This change is Reviewable

@larohra
Copy link
Contributor

larohra commented Jul 2, 2019


azurelinuxagent/common/osutil/default.py, line 349 at r1 (raw file):

                    if errors == len(controllers_to_mount):
                        raise
                    logger.warn("Could not mount cgroup controller {0}: {1}", controller, ustr(exception))

Shouldn't this line logger.warn("Could not mount cgroup controller {0}: {1}", controller, ustr(exception)) be before raising the exception because we want to see the logs incase incase both mounting failed?

@narrieta
Copy link
Member Author

narrieta commented Jul 2, 2019


azurelinuxagent/common/osutil/default.py, line 349 at r1 (raw file):

Previously, larohra wrote…

Shouldn't this line logger.warn("Could not mount cgroup controller {0}: {1}", controller, ustr(exception)) be before raising the exception because we want to see the logs incase incase both mounting failed?

The except a few lines below logs the warning/error (depending on the exception type)

@larohra
Copy link
Contributor

larohra commented Jul 2, 2019


azurelinuxagent/common/osutil/default.py, line 349 at r1 (raw file):

ogger.error("Could not mount cgroups: {0}", ustr(e)

Ohh saw it now, thanks for clarifying

Copy link
Contributor

@larohra larohra left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @pgombar and @vrdmr)

Copy link
Member

@vrdmr vrdmr left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Jul 2, 2019

Codecov Report

❗ No coverage uploaded for pull request base (develop@3be3e1f). Click here to learn what that means.
The diff coverage is 90.9%.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop    #1573   +/-   ##
==========================================
  Coverage           ?   64.29%           
==========================================
  Files              ?       78           
  Lines              ?    11080           
  Branches           ?     1566           
==========================================
  Hits               ?     7124           
  Misses             ?     3615           
  Partials           ?      341
Impacted Files Coverage Δ
azurelinuxagent/common/osutil/default.py 57.47% <90.9%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3be3e1f...0a61b6f. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Jul 2, 2019

Codecov Report

❗ No coverage uploaded for pull request base (develop@3be3e1f). Click here to learn what that means.
The diff coverage is 90.9%.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop    #1573   +/-   ##
==========================================
  Coverage           ?   64.29%           
==========================================
  Files              ?       78           
  Lines              ?    11080           
  Branches           ?     1566           
==========================================
  Hits               ?     7124           
  Misses             ?     3615           
  Partials           ?      341
Impacted Files Coverage Δ
azurelinuxagent/common/osutil/default.py 57.47% <90.9%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3be3e1f...0a61b6f. Read the comment docs.

@narrieta narrieta merged commit 24c7547 into Azure:develop Jul 2, 2019
@narrieta narrieta deleted the mount_cgroups branch July 2, 2019 21:32
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