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

Keep user multipath configuration upon upgrade #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

benjamreis
Copy link
Contributor

@benjamreis benjamreis commented Jul 17, 2023

All files matchin custom.*\.conf will be kept upon upgrade.

See: xapi-project/sm#600

@stormi
Copy link
Contributor

stormi commented Jul 17, 2023

Would be better with a word of context: since PR xapi-project/sm#600, there is text in the multipath/custom.conf file which says:

# Changes made to this file will not be overwritten by future system updates.
# They will also be retained through system upgrades to newer releases.

And it was agreed upon that we would make it become true in the installer.

The current PR does this.

upgrade.py Outdated
@@ -448,6 +448,9 @@ def buildRestoreList(self):
# NRPE service config
self.restore_list += ['etc/nagios/nrpe.cfg', {'dir': 'etc/nrpe.d'}]

# Keep user multipath configuration
self.restore_list += [{'dir': 'etc/multipath/conf.d'}]
Copy link
Contributor

Choose a reason for hiding this comment

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

Here we need to choose between either saving the whole directory, or just custom.conf. Saving the whole directory may be a perk when/if vendors start taking the habit of dropping a file of theirs into this directory when needed.

On the other hand, if we want to keep the liberty of packaging configuration files in /etc/multipath/conf.d, then it may be safer to just add etc/multipath/conf.d/custom.conf to the list.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd say vendors should deploy such files using a RPM anyway, no?

Copy link
Contributor

Choose a reason for hiding this comment

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

what about saving custom*.conf to give users more flexibility and still avoid issues with proper RPMs?

@benjamreis benjamreis force-pushed the restore-multipath-conf branch 2 times, most recently from cb14751 to 08059cf Compare October 16, 2023 08:20
@benjamreis
Copy link
Contributor Author

Hi, we reduced to a specific regex to only save custom config files to avoid conflic with RPM installed files.

What do you guys think? :)

@alexbrett
Copy link
Collaborator

From the sm PR, it seems we state in multipath.conf:

# For custom multipath configuration, create a separate .conf file in the
# /etc/multipath/conf.d/ directory.

However, this change only preserves files that match custom*.conf, which is not quite the same. If people have found the custom.conf file they may see the text in that which says it'll be preserved, but if they have only looked at multipath.conf, and then created e.g. /etc/multipath/conf.d/my_new_file.conf, they might still expect that to be preserved based on the text in multipath.conf.

As such it seems to me the text in multipath.conf should either say e.g. create a separate .conf file in the /etc/multipath/conf.d/ directory. Note filenames beginning with the name custom, will be preserved during system updates/upgrades (or something worded slightly better to that effect), or we should preserve everything, otherwise we risk confusing people?

@ydirson
Copy link
Contributor

ydirson commented Oct 24, 2023

@alexbrett the question would be, would it be valid for eg. an OEM to install files there though a RPM? That's a typical use for the "conf.d" idiom, besides letting user modifications not interfere with system updates.
If we consider that for this particular case it makes no sense (I'm myself not familiar enough with the matter), then fine. But we could also decide to restrict the liberty given in multipath.conf (which incidently people may already have used, making this path maybe harder to choose...)

All files matchin `custom.*\.conf` will be kept
upon upgrade.

See: xapi-project/sm#600

Signed-off-by: BenjiReis <[email protected]>
@ydirson
Copy link
Contributor

ydirson commented Jun 20, 2024

What do you decide? Would you rather simply keep *.conf?

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