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

Metadata rework #3637

Merged
merged 32 commits into from
Jul 22, 2024
Merged

Metadata rework #3637

merged 32 commits into from
Jul 22, 2024

Conversation

jbaublitz
Copy link
Member

Follow up on #3274

@mulkieran
Copy link
Member

@jbaublitz Plz rebase and resolve conflicts.

Copy link
Member

@mulkieran mulkieran left a comment

Choose a reason for hiding this comment

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

Two requests...still working.

src/dbus_api/api/prop_conv.rs Show resolved Hide resolved
plans/all.fmf Show resolved Hide resolved
@jbaublitz jbaublitz force-pushed the metadata-rework branch 3 times, most recently from 2fc437e to 57470ba Compare July 9, 2024 15:34
@jbaublitz jbaublitz force-pushed the metadata-rework branch 2 times, most recently from 2cab794 to 8924c5c Compare July 10, 2024 19:46
@mulkieran mulkieran mentioned this pull request Jul 10, 2024
@jbaublitz
Copy link
Member Author

/packit test

@mulkieran
Copy link
Member

Please go ahead and extend the TMT-based udev and bind tests for v2 pools. #3643 is an indication of how to do that. The actual test changes are not at all considerable, feel free to choose something else if you want.

@jbaublitz jbaublitz force-pushed the metadata-rework branch 3 times, most recently from 9eef69e to 6839415 Compare July 15, 2024 21:43
Copy link
Member

@mulkieran mulkieran left a comment

Choose a reason for hiding this comment

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

In pool-level metadata, "features" is double-nested. Here is an excerpt from the metadata print out.

  "features": {
    "features": [
      "Encryption"
    ]
  },

src/engine/strat_engine/pool/v2.rs Outdated Show resolved Hide resolved
@jbaublitz
Copy link
Member Author

In pool-level metadata, "features" is double-nested. Here is an excerpt from the metadata print out.

  "features": {
    "features": [
      "Encryption"
    ]
  },

This is not a bug, but rather the result of the default behavior for serde derive. We chose to wrap the features in a new-type struct which is resulting in the double nesting. To change the behavior you're seeing if it's important to you, I think we could either replace the new-type struct with a Vector in the metadata or we could rename one of the keys.

@mulkieran
Copy link
Member

In pool-level metadata, "features" is double-nested. Here is an excerpt from the metadata print out.

  "features": {
    "features": [
      "Encryption"
    ]
  },

This is not a bug, but rather the result of the default behavior for serde derive. We chose to wrap the features in a new-type struct which is resulting in the double nesting. To change the behavior you're seeing if it's important to you, I think we could either replace the new-type struct with a Vector in the metadata or we could rename one of the keys.

It is certainly a consequence of the default behavior for serde_derive and it works perfectly correctly within stratisd. The reason I noticed it at all was while writing tests external to stratisd that verify invariants that should hold for the metadata. The question is, is it the metadata structure we want to support or would we prefer to avoid that apparently redundant key?

This commit adds a linear device in between the thin pool and linear
device containing all of the data devices. This will later be used when
the cryptsetup layer is moved on top of the cap device. This way, the
backing device for the crypt device will never change. Changing the
backing device for the dm-crypt device outside of cryptsetup could
result in future problems.
@jbaublitz
Copy link
Member Author

/packit test

@jbaublitz
Copy link
Member Author

I think this might be a timing issue which is why I can't reproduce it locally. Last time rawhide succeeded.

@jbaublitz jbaublitz mentioned this pull request Jul 16, 2024
@jbaublitz jbaublitz mentioned this pull request Jul 18, 2024
Copy link
Member

@mulkieran mulkieran left a comment

Choose a reason for hiding this comment

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

Typo located...

src/engine/strat_engine/backstore/blockdev/v2.rs Outdated Show resolved Hide resolved
Copy link
Member

@mulkieran mulkieran left a comment

Choose a reason for hiding this comment

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

One more...

Copy link
Member

@mulkieran mulkieran left a comment

Choose a reason for hiding this comment

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

Approved, modulo the requirement to remove temporary test redirects.

@mulkieran mulkieran merged commit f0996c5 into stratis-storage:master Jul 22, 2024
47 of 50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants