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

parted: fix _validate_partition_boundary #51407

Merged
merged 1 commit into from Jan 30, 2019

Conversation

@aplanas
Copy link
Contributor

commented Jan 30, 2019

The current partition boundary validator checks that one of the
valid units is a suffix of the boundary, and if so consider it
a valid one. This validation have two problems:

  • We can miss the numerical part of the boundary

    e.g: 's' or 'MB' will be valid units

  • The unit provided can be invalid

    e.g: '10as', '1okB'

The current validator make sure that there is a valid number
and a valid unit in the boundary.

(cherry picked from commit 9e5a0fe)

The current partition boundary validator checks that one of the
valid units is a suffix of the boundary, and if so consider it
a valid one. This validation have two problems:

* We can miss the numerical part of the boundary

  e.g: 's' or 'MB' will be valid units

* The unit provided can be invalid

  e.g: '10as', '1okB'

The current validator make sure that there is a valid number
and a valid unit in the boundary.

(cherry picked from commit 9e5a0fe)
@dwoz
dwoz approved these changes Jan 30, 2019
@dwoz dwoz merged commit 756c367 into saltstack:2019.2 Jan 30, 2019
10 checks passed
10 checks passed
WIP Ready for review
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint Python lint test has passed
Details
jenkins/pr/py2-centos-7 The py2-centos-7 job has passed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has passed
Details
jenkins/pr/py2-windows-2016 The py2-windows-2016 job has passed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has passed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has passed
Details
jenkins/pr/py3-windows-2016 The py3-windows-2016 job has passed
Details
@aplanas aplanas deleted the aplanas:backport_49803 branch Feb 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.