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

Update rpm spec file to ensure the symlinks are kept during an upgrade #155

Conversation

KeithMnemonic
Copy link
Contributor

@KeithMnemonic KeithMnemonic commented Dec 6, 2024

Update rpm spec file to ensure the symlinks are kept during an upgrade

This PR updates the rpm spec file to ensure the symlinks to
configf.yaml and hooks.yaml are maintained during a package upgrade.
In addition, this also fixes an issue with the nvidia-mig-manager
service is set to disabled during an upgrade.

Currently when doing a dnf update or dnf reinstall, those two
symlinks are removed. Adding a check around these functions:

systemctl disable nvidia-mig-manager.service
systemctl daemon-reload
maybe_remove_hooks_symlink
maybe_remove_config_symlink

allows the symlinks to remain when a pacakge is reinstalled or updated
and keeps the systemd service enabled.

.gitignore Outdated Show resolved Hide resolved
@KeithMnemonic KeithMnemonic force-pushed the update_rpm_spec_file_to_keep_symlinks_when_upgrading branch from bf28201 to f28b692 Compare December 9, 2024 19:09
@KeithMnemonic KeithMnemonic force-pushed the update_rpm_spec_file_to_keep_symlinks_when_upgrading branch from f28b692 to 03d2913 Compare December 11, 2024 23:42
This PR updates the rpm spec file to ensure the symlinks to
configf.yaml and hooks.yaml are maintained during a package upgrade.
In addition, this also fixes an issue with the nvidia-mig-manager
service is set to disabled during an upgrade.

Currently when doing a dnf update or dnf reinstall, those two
symlinks are removed. Adding a check around these functions:

systemctl disable nvidia-mig-manager.service
systemctl daemon-reload
maybe_remove_hooks_symlink
maybe_remove_config_symlink

allows the symlinks to remain when a pacakge is reinstalled or updated
and keeps the systemd service enabled.

Closes: 154
Signed-off-by: KeithMnemonic <[email protected]>
@KeithMnemonic KeithMnemonic force-pushed the update_rpm_spec_file_to_keep_symlinks_when_upgrading branch from 03d2913 to e1b4a1b Compare December 12, 2024 20:03
@KeithMnemonic
Copy link
Contributor Author

debug showing the upgrade/reinstall works.

[dgxuser@localhost ~]$ sudo rpm --reinstall -vv ./nvidia-mig-manager-0.10.0-1.x86_64.rpm 
ufdio:       1 reads,    17654 total bytes in 0.000013 secs
D: ============== ./nvidia-mig-manager-0.10.0-1.x86_64.rpm
D: loading keyring from pubkeys in /var/lib/rpm/pubkeys/*.key
D: couldn't find any keys in /var/lib/rpm/pubkeys/*.key
D: loading keyring from rpmdb
D: PRAGMA secure_delete = OFF: 0
D: PRAGMA case_sensitive_like = ON: 0
D: ./nvidia-mig-manager-0.10.0-1.x86_64.rpm: Header SHA1 digest: OK
ufdio:       6 reads,     7516 total bytes in 0.000039 secs
D: Plugin: calling hook init in systemd_inhibit plugin
D:  read h#    1201 
Header SHA1 digest: OK
D:      added binary package [0]
D: found 0 source and 1 binary packages
D: ========== +++ nvidia-mig-manager-0.10.0-1 x86_64/linux 0x2
D:  read h#      68 
Header V4 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Header SHA256 digest: OK
Header SHA1 digest: OK
D:  Requires: /bin/sh                                       YES (db files)
D:  Requires: /bin/sh                                       YES (cached)
D:  read h#     410 
Header V4 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Header SHA256 digest: OK
Header SHA1 digest: OK
D:  Requires: /usr/bin/env                                  YES (db files)
D:  Requires: config(nvidia-mig-manager) = 0.10.0-1         YES (added provide)
D:  read h#      66 
Header V4 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Header SHA256 digest: OK
Header SHA1 digest: OK
D:  Requires: libc.so.6()(64bit)                            YES (db provides)
D:  read h#      66 
Header V4 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Header SHA256 digest: OK
Header SHA1 digest: OK
D:  Requires: libc.so.6(GLIBC_2.2.5)(64bit)                 YES (db provides)
D:  read h#      66 
Header V4 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Header SHA256 digest: OK
Header SHA1 digest: OK
D:  Requires: libdl.so.2()(64bit)                           YES (db provides)
D:  read h#      66 
Header V4 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Header SHA256 digest: OK
Header SHA1 digest: OK
D:  Requires: libdl.so.2(GLIBC_2.2.5)(64bit)                YES (db provides)
D:  read h#      66 
Header V4 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Header SHA256 digest: OK
Header SHA1 digest: OK
D:  Requires: libpthread.so.0()(64bit)                      YES (db provides)
D:  read h#      66 
Header V4 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Header SHA256 digest: OK
Header SHA1 digest: OK
D:  Requires: libpthread.so.0(GLIBC_2.2.5)(64bit)           YES (db provides)
D:  read h#      66 
Header V4 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Header SHA256 digest: OK
Header SHA1 digest: OK
D:  Requires: libpthread.so.0(GLIBC_2.3.2)(64bit)           YES (db provides)
D:  read h#      66 
Header V4 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Header SHA256 digest: OK
Header SHA1 digest: OK
D:  Requires: libresolv.so.2()(64bit)                       YES (db provides)
D:  read h#      66 
Header V4 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Header SHA256 digest: OK
Header SHA1 digest: OK
D:  Requires: libresolv.so.2(GLIBC_2.2.5)(64bit)            YES (db provides)
D:  Requires: rpmlib(CompressedFileNames) <= 3.0.4-1        YES (rpmlib provides)
D:  Requires: rpmlib(FileDigests) <= 4.6.0-1                YES (rpmlib provides)
D:  Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1       YES (rpmlib provides)
D:  read h#      66 
Header V4 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Header SHA256 digest: OK
Header SHA1 digest: OK
D:  Requires: rtld(GNU_HASH)                                YES (db provides)
D:  Requires: rpmlib(PayloadIsXz) <= 5.2-1                  YES (rpmlib provides)
D: ========== --- nvidia-mig-manager-0.10.0-1 x86_64/linux 0x2
D: ========== recording tsort relations
D: ========== tsorting packages (order, #predecessors, #succesors, depth)
D:     0    0    0    1   +nvidia-mig-manager-0.10.0-1.x86_64
D:     1    0    0    1   -nvidia-mig-manager-0.10.0-1.x86_64
D: installing binary packages
D: PRAGMA secure_delete = OFF: 0
D: PRAGMA case_sensitive_like = ON: 0
D: PRAGMA journal_mode = WAL: 0
D: PRAGMA wal_autocheckpoint = 0: 0
D: CREATE INDEX IF NOT EXISTS 'Name_key_idx' ON 'Name'(key ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Basenames_key_idx' ON 'Basenames'(key ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Basenames_hnum_idx' ON 'Basenames'(hnum ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Group_key_idx' ON 'Group'(key ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Requirename_key_idx' ON 'Requirename'(key ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Requirename_hnum_idx' ON 'Requirename'(hnum ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Providename_key_idx' ON 'Providename'(key ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Providename_hnum_idx' ON 'Providename'(hnum ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Conflictname_key_idx' ON 'Conflictname'(key ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Conflictname_hnum_idx' ON 'Conflictname'(hnum ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Obsoletename_key_idx' ON 'Obsoletename'(key ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Obsoletename_hnum_idx' ON 'Obsoletename'(hnum ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Triggername_key_idx' ON 'Triggername'(key ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Triggername_hnum_idx' ON 'Triggername'(hnum ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Dirnames_key_idx' ON 'Dirnames'(key ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Dirnames_hnum_idx' ON 'Dirnames'(hnum ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Sha1header_key_idx' ON 'Sha1header'(key ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Filetriggername_key_idx' ON 'Filetriggername'(key ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Filetriggername_hnum_idx' ON 'Filetriggername'(hnum ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Transfiletriggername_key_idx' ON 'Transfiletriggername'(key ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Transfiletriggername_hnum_idx' ON 'Transfiletriggername'(hnum ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Recommendname_key_idx' ON 'Recommendname'(key ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Recommendname_hnum_idx' ON 'Recommendname'(hnum ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Suggestname_key_idx' ON 'Suggestname'(key ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Suggestname_hnum_idx' ON 'Suggestname'(hnum ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Supplementname_key_idx' ON 'Supplementname'(key ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Supplementname_hnum_idx' ON 'Supplementname'(hnum ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Enhancename_key_idx' ON 'Enhancename'(key ASC): 0
D: CREATE INDEX IF NOT EXISTS 'Enhancename_hnum_idx' ON 'Enhancename'(hnum ASC): 0
D: sanity checking 2 elements
D:  read h#    1201 
Header SHA1 digest: OK
Verifying packages...
ufdio:      76 reads,  2251112 total bytes in 0.000703 secs
D: Plugin: calling hook tsm_pre in selinux plugin
D: selabel_open: (/etc/selinux/targeted/contexts/files/file_contexts) 
D: Plugin: calling hook tsm_pre in systemd_inhibit plugin
D: System shutdown blocked (fd 10)
D: running pre-transaction scripts
D: computing 32 file fingerprints
Preparing packages...
D: computing file dispositions
ufdio:       2 reads,      208 total bytes in 0.000030 secs
ufdio:       2 reads,       64 total bytes in 0.000004 secs
D: 0x0000fd00     4096      9729409     21707428 rotational:-1 /
D: Plugin: calling hook psm_pre in selinux plugin
D: ========== +++ nvidia-mig-manager-0.10.0-1 x86_64-linux 0x2
D: nvidia-mig-manager-0.10.0-1.x86_64: Header SHA1 digest: OK
D:   install: nvidia-mig-manager-0.10.0-1.x86_64 has 16 files
D: Plugin: calling hook psm_pre in selinux plugin
nvidia-mig-manager-0.10.0-1.x86_64
D: create     040755  1 (   0,   0)     0 /etc/nvidia-mig-manager
D: create     100644  1 (   0,   0)  6598 /etc/nvidia-mig-manager/config-default.yaml;675b3ba7
D: create     100644  1 (   0,   0)   631 /etc/nvidia-mig-manager/hooks-default.yaml;675b3ba7
D: create     100644  1 (   0,   0)   191 /etc/nvidia-mig-manager/hooks-minimal.yaml;675b3ba7
D: create     100644  1 (   0,   0)  2629 /etc/nvidia-mig-manager/hooks.sh;675b3ba7
D: create     100755  1 (   0,   0)  2499 /etc/nvidia-mig-manager/service.sh;675b3ba7
D: create     100644  1 (   0,   0)  4445 /etc/nvidia-mig-manager/utils.sh;675b3ba7
D: touch      100644  1 (   0,   0)   208 /etc/profile.d/nvidia-mig-parted.sh
D: create     040755  1 (   0,   0)     0 /etc/systemd/system/nvidia-mig-manager.service.d
D: touch      100644  1 (   0,   0)    64 /etc/systemd/system/nvidia-mig-manager.service.d/override.conf
D: create     100755  1 (   0,   0)8055608 /usr/bin/nvidia-mig-parted;675b3ba7
D: create     100644  1 (   0,   0)   943 /usr/lib/systemd/system/nvidia-gpu-reset.target;675b3ba7
D: create     100644  1 (   0,   0)   918 /usr/lib/systemd/system/nvidia-mig-manager.service;675b3ba7
D: create     040755  1 (   0,   0)     0 /usr/share/licenses/nvidia-mig-manager-0.10.0
D: create     100644  1 (   0,   0) 11358 /usr/share/licenses/nvidia-mig-manager-0.10.0/LICENSE;675b3ba7
D: create     040755  1 (   0,   0)     0 /var/lib/nvidia-mig-manager
D: Plugin: calling hook fsm_file_prepare in selinux plugin
D: lsetfilecon: (11 /etc/nvidia-mig-manager, system_u:object_r:etc_t:s0) 
fdio:       1 writes,     6598 total bytes in 0.000027 secs
D: Plugin: calling hook fsm_file_prepare in selinux plugin
D: lsetfilecon: (12 /etc/nvidia-mig-manager/config-default.yaml;675b3ba7, system_u:object_r:etc_t:s0) 
fdio:       1 writes,      631 total bytes in 0.000021 secs
D: Plugin: calling hook fsm_file_prepare in selinux plugin
D: lsetfilecon: (12 /etc/nvidia-mig-manager/hooks-default.yaml;675b3ba7, system_u:object_r:etc_t:s0) 
fdio:       1 writes,      191 total bytes in 0.000016 secs
D: Plugin: calling hook fsm_file_prepare in selinux plugin
D: lsetfilecon: (12 /etc/nvidia-mig-manager/hooks-minimal.yaml;675b3ba7, system_u:object_r:etc_t:s0) 
fdio:       1 writes,     2629 total bytes in 0.000047 secs
D: Plugin: calling hook fsm_file_prepare in selinux plugin
D: lsetfilecon: (12 /etc/nvidia-mig-manager/hooks.sh;675b3ba7, system_u:object_r:etc_t:s0) 
fdio:       1 writes,     2499 total bytes in 0.000016 secs
D: Plugin: calling hook fsm_file_prepare in selinux plugin
D: lsetfilecon: (12 /etc/nvidia-mig-manager/service.sh;675b3ba7, system_u:object_r:etc_t:s0) 
fdio:       1 writes,     4445 total bytes in 0.000016 secs
D: Plugin: calling hook fsm_file_prepare in selinux plugin
D: lsetfilecon: (12 /etc/nvidia-mig-manager/utils.sh;675b3ba7, system_u:object_r:etc_t:s0) 
D: Plugin: calling hook fsm_file_prepare in selinux plugin
D: lsetfilecon: (12 /etc/profile.d/nvidia-mig-parted.sh, system_u:object_r:bin_t:s0) 
D: Plugin: calling hook fsm_file_prepare in selinux plugin
D: lsetfilecon: (11 /etc/systemd/system/nvidia-mig-manager.service.d, system_u:object_r:systemd_unit_file_t:s0) 
D: Plugin: calling hook fsm_file_prepare in selinux plugin
D: lsetfilecon: (12 /etc/systemd/system/nvidia-mig-manager.service.d/override.conf, system_u:object_r:systemd_unit_file_t:s0) 
fdio:     246 writes,  8055608 total bytes in 0.006009 secs
D: Plugin: calling hook fsm_file_prepare in selinux plugin
D: lsetfilecon: (12 /usr/bin/nvidia-mig-parted;675b3ba7, system_u:object_r:xserver_exec_t:s0) 
fdio:       1 writes,      943 total bytes in 0.000032 secs
D: Plugin: calling hook fsm_file_prepare in selinux plugin
D: lsetfilecon: (12 /usr/lib/systemd/system/nvidia-gpu-reset.target;675b3ba7, system_u:object_r:systemd_unit_file_t:s0) 
fdio:       1 writes,      918 total bytes in 0.000022 secs
D: Plugin: calling hook fsm_file_prepare in selinux plugin
D: lsetfilecon: (12 /usr/lib/systemd/system/nvidia-mig-manager.service;675b3ba7, system_u:object_r:systemd_unit_file_t:s0) 
D: Plugin: calling hook fsm_file_prepare in selinux plugin
D: lsetfilecon: (11 /usr/share/licenses/nvidia-mig-manager-0.10.0, system_u:object_r:usr_t:s0) 
fdio:       1 writes,    11358 total bytes in 0.000019 secs
D: Plugin: calling hook fsm_file_prepare in selinux plugin
D: lsetfilecon: (12 /usr/share/licenses/nvidia-mig-manager-0.10.0/LICENSE;675b3ba7, system_u:object_r:usr_t:s0) 
D: Plugin: calling hook fsm_file_prepare in selinux plugin
D: lsetfilecon: (12 /var/lib/nvidia-mig-manager, system_u:object_r:var_lib_t:s0) 
fdio:     331 reads,  8088688 total bytes in 0.196485 secs
D: SAVEPOINT 'rwlock': 0
D: SAVEPOINT 'Packages': 0
D: RELEASE 'Packages': 0
D: SAVEPOINT 'Name': 0
D: adding "nvidia-mig-manager" to Name index.
D: RELEASE 'Name': 0
D: SAVEPOINT 'Basenames': 0
D: adding 16 entries to Basenames index.
D: RELEASE 'Basenames': 0
D: SAVEPOINT 'Group': 0
D: adding "Development/Tools" to Group index.
D: RELEASE 'Group': 0
D: SAVEPOINT 'Requirename': 0
D: adding 18 entries to Requirename index.
D: RELEASE 'Requirename': 0
D: SAVEPOINT 'Providename': 0
D: adding 3 entries to Providename index.
D: RELEASE 'Providename': 0
D: SAVEPOINT 'Dirnames': 0
D: adding 10 entries to Dirnames index.
D: RELEASE 'Dirnames': 0
D: SAVEPOINT 'Installtid': 0
D: adding 1 entries to Installtid index.
D: RELEASE 'Installtid': 0
D: SAVEPOINT 'Sigmd5': 0
D: adding 1 entries to Sigmd5 index.
D: RELEASE 'Sigmd5': 0
D: SAVEPOINT 'Sha1header': 0
D: adding "71e95cfb4f6def3efe406f2b80a72a81916917a6" to Sha1header index.
D: RELEASE 'Sha1header': 0
D: RELEASE 'rwlock': 0
D: %post(nvidia-mig-manager-0.10.0-1.x86_64): scriptlet start
fdio:       2 writes,      819 total bytes in 0.000017 secs
D: %post(nvidia-mig-manager-0.10.0-1.x86_64): execv(/bin/sh) pid 4501
D: Plugin: calling hook scriptlet_fork_post in selinux plugin
D: setexecfilecon: (/bin/sh, rpm_script_t) 
+ systemctl daemon-reload
+ systemctl enable nvidia-mig-manager.service
+ maybe_add_hooks_symlink
+ '[' -e /etc/nvidia-mig-manager/hooks.yaml ']'
+ return
+ maybe_add_config_symlink
+ '[' -e /etc/nvidia-mig-manager/config.yaml ']'
+ return
D: %post(nvidia-mig-manager-0.10.0-1.x86_64): waitpid(4501) rc 4501 status 0
ufdio:       6 reads,     7516 total bytes in 0.000010 secs
D: ========== +++ nvidia-mig-manager-0.10.0-1 x86_64-linux 0x2
D:     erase: nvidia-mig-manager-0.10.0-1.x86_64 has 16 files
D: Plugin: calling hook psm_pre in selinux plugin
D: %preun(nvidia-mig-manager-0.10.0-1.x86_64): scriptlet start
fdio:       2 writes,      888 total bytes in 0.000024 secs
D: %preun(nvidia-mig-manager-0.10.0-1.x86_64): execv(/bin/sh) pid 4558
D: Plugin: calling hook scriptlet_fork_post in selinux plugin
D: setexecfilecon: (/bin/sh, rpm_script_t) 
+ '[' 1 -eq 0 ']'
D: %preun(nvidia-mig-manager-0.10.0-1.x86_64): waitpid(4558) rc 4558 status 0
nvidia-mig-manager-0.10.0-1.x86_64
D:   --- h#    1201 nvidia-mig-manager-0.10.0-1.x86_64
D: SAVEPOINT 'rwlock': 0
D: SAVEPOINT 'Packages': 0
D: RELEASE 'Packages': 0
D: SAVEPOINT 'Name': 0
D: RELEASE 'Name': 0
D: SAVEPOINT 'Basenames': 0
D: RELEASE 'Basenames': 0
D: SAVEPOINT 'Group': 0
D: RELEASE 'Group': 0
D: SAVEPOINT 'Requirename': 0
D: RELEASE 'Requirename': 0
D: SAVEPOINT 'Providename': 0
D: RELEASE 'Providename': 0
D: SAVEPOINT 'Conflictname': 0
D: RELEASE 'Conflictname': 0
D: SAVEPOINT 'Obsoletename': 0
D: RELEASE 'Obsoletename': 0
D: SAVEPOINT 'Triggername': 0
D: RELEASE 'Triggername': 0
D: SAVEPOINT 'Dirnames': 0
D: RELEASE 'Dirnames': 0
D: SAVEPOINT 'Installtid': 0
D: RELEASE 'Installtid': 0
D: SAVEPOINT 'Sigmd5': 0
D: RELEASE 'Sigmd5': 0
D: SAVEPOINT 'Sha1header': 0
D: RELEASE 'Sha1header': 0
D: SAVEPOINT 'Filetriggername': 0
D: RELEASE 'Filetriggername': 0
D: SAVEPOINT 'Transfiletriggername': 0
D: RELEASE 'Transfiletriggername': 0
D: SAVEPOINT 'Recommendname': 0
D: RELEASE 'Recommendname': 0
D: SAVEPOINT 'Suggestname': 0
D: RELEASE 'Suggestname': 0
D: SAVEPOINT 'Supplementname': 0
D: RELEASE 'Supplementname': 0
D: SAVEPOINT 'Enhancename': 0
D: RELEASE 'Enhancename': 0
D: RELEASE 'rwlock': 0
D: running post-transaction scripts
D: %transfiletriggerin(glibc-common-2.34-125.el9_5.1.x86_64): scriptlet start
fdio:       2 writes,       21 total bytes in 0.000030 secs
D: %transfiletriggerin(glibc-common-2.34-125.el9_5.1.x86_64): execv(/bin/sh) pid 4559
D: Plugin: calling hook scriptlet_fork_post in selinux plugin
D: setexecfilecon: (/bin/sh, rpm_script_t) 
+ /sbin/ldconfig
D: %transfiletriggerin(glibc-common-2.34-125.el9_5.1.x86_64): waitpid(4559) rc 4559 status 0
D: %transfiletriggerin(systemd-252-46.el9_5.2.x86_64): scriptlet start
fdio:       2 writes,      382 total bytes in 0.000063 secs
D: %transfiletriggerin(systemd-252-46.el9_5.2.x86_64): execv(/bin/sh) pid 4561
D: Plugin: calling hook scriptlet_fork_post in selinux plugin
D: setexecfilecon: (/bin/sh, rpm_script_t) 
+ test -d /run/systemd/system
+ /usr/bin/systemctl daemon-reload
+ /usr/bin/systemctl reload-or-restart --marked
D: %transfiletriggerin(systemd-252-46.el9_5.2.x86_64): waitpid(4561) rc 4561 status 0
D: %transfiletriggerpostun(systemd-252-46.el9_5.2.x86_64): scriptlet start
fdio:       2 writes,      314 total bytes in 0.000019 secs
D: %transfiletriggerpostun(systemd-252-46.el9_5.2.x86_64): execv(/bin/sh) pid 4591
D: Plugin: calling hook scriptlet_fork_post in selinux plugin
D: setexecfilecon: (/bin/sh, rpm_script_t) 
+ test -d /run/systemd/system
+ /usr/bin/systemctl daemon-reload
D: %transfiletriggerpostun(systemd-252-46.el9_5.2.x86_64): waitpid(4591) rc 4591 status 0
D: %transfiletriggerpostun(systemd-252-46.el9_5.2.x86_64): scriptlet start
fdio:       2 writes,      164 total bytes in 0.000027 secs
D: %transfiletriggerpostun(systemd-252-46.el9_5.2.x86_64): execv(/bin/sh) pid 4620
D: Plugin: calling hook scriptlet_fork_post in selinux plugin
D: setexecfilecon: (/bin/sh, rpm_script_t) 
+ test -d /run/systemd/system
+ /usr/bin/systemctl reload-or-restart --marked
D: %transfiletriggerpostun(systemd-252-46.el9_5.2.x86_64): waitpid(4620) rc 4620 status 0
D:  read h#    1202 
Header SHA1 digest: OK
D: Plugin: calling hook psm_pre in selinux plugin
D: Plugin: calling hook tsm_post in audit plugin
D: Plugin: calling hook tsm_post in selinux plugin
D: Plugin: calling hook tsm_post in systemd_inhibit plugin
D: System shutdown unblocked
D: syncing fs /
D: PRAGMA synchronous = FULL: 0
D: PRAGMA optimize: 0
D: PRAGMA wal_checkpoint = TRUNCATE: 0
D: Exit status: 0
[dgxuser@localhost ~]$ ls -al /etc/nvidia-mig-manager/
total 44
drwxr-xr-x.   2 root root  172 Dec 12 14:38 .
drwxr-xr-x. 136 root root 8192 Dec 12 14:38 ..
-rw-r--r--.   1 root root 6598 Dec 12 14:08 config-default.yaml
lrwxrwxrwx.   1 root root   19 Dec 12 14:37 config.yaml -> config-default.yaml
-rw-r--r--.   1 root root  631 Dec 12 14:08 hooks-default.yaml
-rw-r--r--.   1 root root  191 Dec 12 14:08 hooks-minimal.yaml
-rw-r--r--.   1 root root 2629 Dec 12 14:08 hooks.sh
lrwxrwxrwx.   1 root root   18 Dec 12 14:37 hooks.yaml -> hooks-default.yaml
-rwxr-xr-x.   1 root root 2499 Dec 12 14:08 service.sh
-rw-r--r--.   1 root root 4445 Dec 12 14:08 utils.sh
[dgxuser@localhost ~]$ sudo systemctl status nvidia-mig-manager
○ nvidia-mig-manager.service - Configure MIG on NVIDIA GPUs
     Loaded: loaded (/usr/lib/systemd/system/nvidia-mig-manager.service; enabled; preset: disabled)
    Drop-In: /etc/systemd/system/nvidia-mig-manager.service.d
             └─override.conf
     Active: inactive (dead)
     ```

Copy link
Contributor

@cdesiniotis cdesiniotis left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @KeithMnemonic

@cdesiniotis cdesiniotis merged commit 0a4df2c into NVIDIA:main Dec 13, 2024
9 checks passed
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