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

Fix for the issue on recent FreeBSD 11 with the resource disc #743

Merged
merged 2 commits into from
Jun 5, 2017

Conversation

minusbat
Copy link
Contributor

@minusbat minusbat commented Jun 1, 2017

This is a fix for the resource disc issue. Instead of returning the first device it finds, it instead splits the list and skips any devices which begin 'pass'. This works for both the old and the new ordering.

In addition the returned device is checked to make sure it is in the 'disks' in the same way as the fallback code does, thus triggering the fallback path if a wrong device is somehow returned.

    This is the same check the fallback code uses, and is necessary as on
    later FreeBSD 11 versions the disc are retruned in reverse order. Thus
    the original function returns 'pass1' instead of 'da1' which fails. This
    fixes the issue and allows the resource disc to be mounted again, though
    relying on the fallback is not the cleanest solution.
@msftclas
Copy link

msftclas commented Jun 1, 2017

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

This fixes the error introduced in FreeBSD 11 where the order of
outout from camcontrol changed from da1,pass1 to pass1,da1 and thus
waagent misidentified the disc as 'pass1'. Instead of taking the
first device, we now split the string at ',' and return the first
device which does not begin 'pass'.
Copy link
Member

@hglkrijger hglkrijger left a comment

Choose a reason for hiding this comment

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

lgtm

@hglkrijger hglkrijger merged commit 9bed398 into Azure:master Jun 5, 2017
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