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

filesystem: probe NVMe controllers when running the restricted probe #1978

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

ogayot
Copy link
Member

@ogayot ogayot commented Apr 23, 2024

If block probing times out, we rerun it with the restricted set of probes. Sadly, the restricted set does not include "nvme" so we do not enumerate NVMe controllers. This leads to the following error if NVMe storage devices are present:

  File "subiquity/models/filesystem.py", line 1492, in reset
    self.process_probe_data()
  File "subiquity/models/filesystem.py", line 1512, in process_probe_data
    self._orig_config = storage_config.extract_storage_config(self._probe_data)[
  File "/site-packages/curtin/storage_config.py", line 1420, in extract_storage_config
    tree = get_config_tree(cfg.get('id'), final_config)
  File "/site-packages/curtin/storage_config.py", line 313, in get_config_tree
    for dep in find_item_dependencies(item, sconfig):
  File "/site-packages/curtin/storage_config.py", line 283, in find_item_dependencies
    _validate_dep_type(item_id, dep_key, dep, config)
  File "/site-packages/curtin/storage_config.py", line 230, in _validate_dep_type
    raise ValueError(
ValueError: Invalid dep_id (nvme-controller-nvme0) not in storage config

Fixed by also enumerating NVMe controllers as part of the restricted probe operation.

LP:#2063162

I intend to mention this bug in the release notes for 24.04.1.

If block probing times out, we rerun it with the restricted set of
probes. Sadly, the restricted set does not include "nvme" so we do not
enumerate NVMe controllers. This leads to the following error if NVMe
storage devices are present:

  File "subiquity/models/filesystem.py", line 1492, in reset
    self.process_probe_data()
  File "subiquity/models/filesystem.py", line 1512, in process_probe_data
    self._orig_config = storage_config.extract_storage_config(self._probe_data)[
  File "/site-packages/curtin/storage_config.py", line 1420, in extract_storage_config
    tree = get_config_tree(cfg.get('id'), final_config)
  File "/site-packages/curtin/storage_config.py", line 313, in get_config_tree
    for dep in find_item_dependencies(item, sconfig):
  File "/site-packages/curtin/storage_config.py", line 283, in find_item_dependencies
    _validate_dep_type(item_id, dep_key, dep, config)
  File "/site-packages/curtin/storage_config.py", line 230, in _validate_dep_type
    raise ValueError(
ValueError: Invalid dep_id (nvme-controller-nvme0) not in storage config

Fixed by also enumerating NVMe controllers as part of the restricted
probe operation.

Signed-off-by: Olivier Gayot <[email protected]>
Copy link
Collaborator

@mwhudson mwhudson left a comment

Choose a reason for hiding this comment

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

sure. the correct thing to do is of course delete the concept of restricted probing but this is better than the status quo

@ogayot ogayot merged commit 1d7c7c0 into canonical:main Apr 26, 2024
10 checks passed
@ogayot ogayot deleted the restricted-block-probing+nvme branch April 26, 2024 07:14
d-loose added a commit to d-loose/ubuntu-desktop-provision that referenced this pull request Jun 25, 2024
- includes canonical/subiquity#1978
- also fixes the subiquity_client type generator tests
@elehcim
Copy link

elehcim commented Oct 8, 2024

sure. the correct thing to do is of course delete the concept of restricted probing but this is better than the status quo

Yes, I also have the same problem with error related to sda (as reported here).

ValueError: Invalid dep_id (partition-sda1) not in storage config

@elehcim
Copy link

elehcim commented Oct 8, 2024

sure. the correct thing to do is of course delete the concept of restricted probing but this is better than the status quo

Yes, I also have the same problem with error related to sda (as reported here).

ValueError: Invalid dep_id (partition-sda1) not in storage config

I found out that the issue was due to the fact that the USB had been created with the wrong tool (see here). Would it be possible to make the installer a bit more resilient on this?

@ogayot
Copy link
Member Author

ogayot commented Oct 8, 2024

Yes, I also have the same problem with error related to sda (as reported here).

ValueError: Invalid dep_id (partition-sda1) not in storage config

I found out that the issue was due to the fact that the USB had been created with the wrong tool (see here). Would it be possible to make the installer a bit more resilient on this?

@elehcim the original issue filed was related to the use of NVMe drives. However, I'm interested to know more about the "tool" you used that produced the wrong result for you. Could you elaborate on that? Which tool worked and which tool didn't?

@elehcim
Copy link

elehcim commented Oct 8, 2024

@ogayot, thanks for the reply! I had the issue when creating the USB via the Disks app (using Restore Partition Image option, probably wrongly). Creating the USB with the usb-creator-gtk tool solved the problem. Now I'm able to install the OS

@ogayot
Copy link
Member Author

ogayot commented Oct 8, 2024

@ogayot, thanks for the reply! I had the issue when creating the USB via the Disks app (using Restore Partition Image option, probably wrongly). Creating the USB with the usb-creator-gtk tool solved the problem. Now I'm able to install the OS

Thanks for the info. I've filed https://bugs.launchpad.net/subiquity/+bug/2083924 to track progress. If you still have the logs for the failed installation, I'd appreciate if you could comment on the bug whether the "Validation error: ...... does not match ..." error is found in the Subiquity log file. Thanks!

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.

4 participants