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

L3 Veritas Volume Manager: Allow to Ignore Probe Errors (SLE-15-SP1) #1153

Merged
merged 2 commits into from
Oct 21, 2020
Merged

L3 Veritas Volume Manager: Allow to Ignore Probe Errors (SLE-15-SP1) #1153

merged 2 commits into from
Oct 21, 2020

Conversation

shundhammer
Copy link
Contributor

@shundhammer shundhammer commented Oct 20, 2020

Bugzilla

https://bugzilla.suse.com/show_bug.cgi?id=1177332

This is the PR against SLE-15-SP1

Trello

https://trello.com/c/rjFULQ97/

Problem

Some third-party storage software like the Veritas Volume Manager use a disk label (partitioning scheme) that we don't support in libstorage-ng and yast-storage-ng. In this particular case, they use a Sun disk label for disks below 2 TB, and GPT above that size.

When starting the YaST partitioner, libstorage-ng detects the unsupported disk label and reports it as an error. That error is displayed in an error pop-up dialog, and the user can choose to continue anyway (in which case that disk is treated as if it were empty, i.e. no partitions are shown).

In this particular case, the customer had 29 disks and found the sheer number of reported errors overwhelming. They wanted to have a mechanism to speed this up; even more so since this happens every time the YaST partitioner is started.

Solution

This PR introduces a new environment variable $LIBSTORAGE_IGNORE_PROBE_ERRORS. If set, all errors found during probing are suppressed and treated as if the user had chosen "Continue" in the error pop-up. No error pop-up is shown.

Usage

xhost +
sudo LIBSTORAGE_IGNORE_PROBE_ERRORS=1 yast2 disk

or

export LIBSTORAGE_IGNORE_PROBE_ERRORS=1
sudo yast2 disk

Test

Unit Test

cd yast-storage-ng/src/test/lib/callbacks
rspec probe_test.rb
cd ../../..
rake test:unit

Manual Test

  • In the VM manager, add a new virtual disk

  • Start the VM

  • Log in

  • Create a Sun disk label on that disk:

    sudo parted /dev/sdb mklabel sun
    
  • Start the YaST partitioner normally; it will complain about that disk.

    xhost +
    sudo yast2 disk
    
  • Start it with the new environment variable; it will not complain:

    sudo LIBSTORAGE_IGNORE_PROBE_ERRORS=1 yast2 disk
    

Related PRs

@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 97.438% when pulling 93327eb on shundhammer:huha-ignore-probe-errors-sp1 into 7ab9f5e on yast:SLE-15-SP1.

@mvidner
Copy link
Member

mvidner commented Oct 21, 2020

Thanks!

LIBSTORAGE_IGNORE_PROBE_ERRORS=1 removes the popups from the UI. What about the logs? Should YaST log them, or does libstorage log them anyway?

@shundhammer
Copy link
Contributor Author

shundhammer commented Oct 21, 2020

It's logged on the libstorage-ng side already. You can see an exception that is thrown and then caught inside libstorage-ng.

@mvidner
Copy link
Member

mvidner commented Oct 21, 2020

BTW the correct commands for the new tests are:

cd test/y2storage/callbacks/
rspec probe_test.rb 

Copy link
Member

@mvidner mvidner left a comment

Choose a reason for hiding this comment

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

As discussed on yesterday's call, this is a good approach for a quick fix / maintenance update.

(Alternatives to be considered for the master branch: aggregate the errors to a single popup, add a "Skip all messages like this one" button)

@shundhammer shundhammer merged commit dca1a5f into yast:SLE-15-SP1 Oct 21, 2020
@shundhammer shundhammer changed the title L3 Veritas Volume Manager: Allow to Ignore Probe Errors L3 Veritas Volume Manager: Allow to Ignore Probe Errors (SLE-15-SP1) Oct 21, 2020
@shundhammer shundhammer deleted the huha-ignore-probe-errors-sp1 branch October 22, 2020 13:06
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