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

facts: fix device uuid's on el6 #36128

Merged
merged 4 commits into from
Feb 16, 2018
Merged

Conversation

mkrizek
Copy link
Contributor

@mkrizek mkrizek commented Feb 13, 2018

SUMMARY

Fixes #36077

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

facts

ANSIBLE VERSION
devel
ADDITIONAL INFORMATION

@mkrizek mkrizek requested a review from alikins February 13, 2018 16:41
@mkrizek mkrizek added this to READY TO REVIEW in CEM Feb 13, 2018
@ansibot ansibot added bugfix_pull_request needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Feb 13, 2018
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Feb 13, 2018
@mattclay
Copy link
Member

@mattclay mattclay added the ci_verified Changes made in this PR are causing tests to fail. label Feb 13, 2018
@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Feb 13, 2018
@ansibot ansibot added test This PR relates to tests. and removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Feb 14, 2018
if rc != 0:
return uuid

m = re.search('ID_FS_UUID=(.*)\n', out)
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to see an example output of 'udevadm info --query property --name $DEVICE' and a test case that uses it to verify the regex here. It may be easier to test if the parsing bit is split into a separate method.

(granted, that is a very simple regex at the moment...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 unit test added

@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Feb 14, 2018
@mattclay
Copy link
Member

CI failure in python 3 unit tests:

>       return _compile(pattern, flags).search(string)
E       TypeError: cannot use a string pattern on a bytes-like object

/usr/lib/python3.5/re.py:173: TypeError

@mattclay mattclay added the ci_verified Changes made in this PR are causing tests to fail. label Feb 14, 2018
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Feb 15, 2018
@mkrizek
Copy link
Contributor Author

mkrizek commented Feb 15, 2018

@alikins tests pass, is this good to merge?

@alikins
Copy link
Contributor

alikins commented Feb 16, 2018

LGTM

@alikins alikins merged commit 3a5263a into ansible:devel Feb 16, 2018
@mkrizek mkrizek deleted the hw-facts-uuid-el6 branch February 16, 2018 15:54
@mkrizek mkrizek moved this from READY TO REVIEW to DONE in CEM Feb 16, 2018
@ansibot ansibot added the bug This issue/PR relates to a bug. label Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests.
Projects
No open projects
CEM
DONE
Development

Successfully merging this pull request may close these issues.

RHEL 6 Mount Facts Display "N/A" for UUID
5 participants