Comment 18 for bug 1867366

Revision history for this message
Dan Streetman (ddstreet) wrote :

Thanks for the review and analysis!

> > Assumption:
> - If no hostnqn is given, then there is no way a fabric was configured, and you're
> safe to delete both files.
>
> Logic:
> - check if hostnqn is set in /etc/nvme/hostnqn, if yes warn user hostid can be
> duplicated
> - if not, check if hostid was changed.. if yes, keep it... if no change it to
> correct one, create hostnqn

Sounds good, I'll update the postinst and reupload for Focal, thanks!

For Bionic, since the files were not created, I assume just adding the postinst to create the files if empty is all that's needed?

> Make Sure:
> - both files /etc/nvme/hostnqn and /etc/nvme/hostid are kept on purge (just because
> they are related to host identification, user can delete later if really wanted).

yep; since they're generated by the postinst, the package doesn't consider that it owns them, so removing or purging the package shouldn't remove the files - although it will remove the discovery.conf file on purge, since the package does consider that a conf file, but I think that's correct behavior, since it's only conf, not host-specific ids (right?)