-
Notifications
You must be signed in to change notification settings - Fork 59
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
If an option is omitted on existing volume, it gets reset to the default. #48
Comments
Quoting @dwlehman 's reply:
Quoting my reply:
|
There has to be a way to specify that a given volume not be mounted, obviously. We may need more sophisticated default handling if we're going to need to differentiate between "the default" and "whatever is already there". By the way, the latter is invalid for a non-existent volume. |
Of course. ZFS uses mountpoint=none for this. I think this already works in the role.
Sure. The latter could be defined as "default for new volumes, whatever is already there for existing volumes". By the way, how exactly does |
|
At high level, this is an important point, specifically whatever is already there. It becomes exceedingly complex to account for (and especially test for) a near-infinite number of pre-existing configurations for configuration management, such as Ansible. When Central CI adopted cinch Ansible automation, previous systems configured with Puppet were deleted and re-deployed from scratch using cinch, so as to avoid the complexity being discussed here. This also applies to situations where systems were configured manually. |
The only snag I can think of here is that this logic will almost have to be within the provider/backend module(s) since doing it in yaml is not going to be viable (at least not for the blivet provider). These are the main reasons I chose to store the defaults in yaml:
I think these are both pretty important. Any feedback on that? I guess I can pass the defaults into the blivet module, but it feels a bit gross. At any rate, this better/more-complex logic for filling in omitted values is going to have to live in something more capable than yaml. I'll work on prototyping it in the blivet module for now. |
The role should be able to keep settings that are not changed like for example mount points, labels, etc. while you are resizing a filesystem. It should not expect that all settings that are not changed are provided again. |
Volumes of type 'disk' present an interesting problem since they are always existing. At this point we could differentiate between cases where the formatting type is recognized by blkid versus not, but that definitely leaves room for accidental data loss if the device contains data with a format that blkid does not recognize. |
@dwlehman this is true, but how is it related to the subject of this issue? IIUC the problem of accidentally deleting data that is not recognized by blkid exists already, independently of the change suggested in this issue. By the way, I found that the value of |
Actually, the issue with label seems to be rather that the role does not support changing it at all and ignores it even when given explicitly and not creating a new filesystem. |
In this case blkid's inability to recognize the metadata will lead to us destroying data when we're claiming to be careful not to do so. It's true that this problem is independent of device/volume type, but it is particularly troublesome for |
I still don't see the relation to this issue. We already claim to be careful not to destroy existing data in #43 . |
Also it is not really different from existing utilities that require some kind of "force" flag to overwrite what they consider to be existing data (think |
I'm not saying that it only becomes an problem within the context of this issue, but I am saying that volumes of type |
I think that it would be good to have additional states like |
How would |
@t-woerner can you please show an example role input variable showing what you have in mind? It is not clear to me either. |
@pcahyna How do you unmount at the moment using the storage role without removing the volume? The documentation of the role is not providing this information. |
You define the volume with a mount point of |
@dwlehman I would suggest to use |
@pcahyna in general (AFAIK) ansible treats |
AFAIK |
Omitted
mount_point
: the volume gets unmounted.Type switching: if I omit
fs_type:
, the volume gets reformatted with the default type (xfs). Wouldn't it be more reasonable to keep the existing filesystem? (note that withstorage_safe_mode
introduced in #43, any destructive operation is prevented - the role errors out. Still, there is the question whether even attempting to change the type to default is reasonable.)Originally posted by @pcahyna in #43 (comment)
The text was updated successfully, but these errors were encountered: