[Bug 900099] New: smartmontools: generate_smartd_opts refers to init script
http://bugzilla.suse.com/show_bug.cgi?id=900099 Bug ID: 900099 Summary: smartmontools: generate_smartd_opts refers to init script Classification: openSUSE Product: openSUSE Factory Version: 201410* Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Other Assignee: sbrabec@suse.com Reporter: lnussel@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- - /usr/lib/smartmontools/generate_smartd_opts refers to an init script that no longer exists - /usr/lib/smartmontools/generate_smartd_opts is never called AFAICS unless one uses YaST to edit /etc/sysconfig/smartmontools. Maybe the service file should call it before launching smartd? - /var/lib/smartmontools/smartd_opts should probably be moved to /run - rcsmartd symlink is missing -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=900099 Stanislav Brabec <sbrabec@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CONFIRMED --- Comment #1 from Stanislav Brabec <sbrabec@suse.com> --- - /usr/lib/smartmontools/generate_smartd_opts refers to an init script that no longer exists It tries to restart service. Needs fix. - /usr/lib/smartmontools/generate_smartd_opts is never called AFAICS unless one uses YaST to edit /etc/sysconfig/smartmontools. Maybe the service file should call it before launching smartd? It is called by YaST and in %post. - /var/lib/smartmontools/smartd_opts should probably be moved to /run This file should be reboot persistent, as it prevents need of calling shell on every boot. - rcsmartd symlink is missing I will re-add it. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=900099 --- Comment #3 from Ludwig Nussel <lnussel@suse.com> --- (In reply to Stanislav Brabec from comment #1)
- /usr/lib/smartmontools/generate_smartd_opts refers to an init script that no longer exists
It tries to restart service. Needs fix.
- /usr/lib/smartmontools/generate_smartd_opts is never called AFAICS unless one uses YaST to edit /etc/sysconfig/smartmontools. Maybe the service file should call it before launching smartd?
It is called by YaST and in %post.
- /var/lib/smartmontools/smartd_opts should probably be moved to /run
This file should be reboot persistent, as it prevents need of calling shell on every boot.
That way you need to know that you need to call this script after editing the sysconfig file though. Which is likely non obvious to most people as they are unfamiliar with the extra yast syntax in there. Alternatively the file could be retired completely. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=900099 --- Comment #4 from Stanislav Brabec <sbrabec@suse.com> --- The sysconfig file was created on a customer request. Now upstream has a support for EnvironmentFile systemd feature. We can use it, but it will reduce verbosity of the sysconfig file. Instead of many smart options, there will be only one: smartd_opts. There is a problem, why I wrote the script: systemd cannot do smart environment expansion IF (string foo is not empty) THEN use -B foo -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=900099 Marc Schütz <schuetzm@gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |schuetzm@gmx.net --- Comment #5 from Marc Schütz <schuetzm@gmx.net> --- Nitpick: /var/lib/smartmontools/smartd_opts says in a comment it's been generated by /usr/lib64/smartmontools/generate_smartd_opts, but the script is really in /usr/lib/smartmontools/generate_smartd_opts (no lib64). -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=900099 --- Comment #6 from Stanislav Brabec <sbrabec@suse.com> --- Marc Schütz: This was already fixed by: Tue Oct 7 22:55:04 CEST 2014 - sbrabec@suse.cz - Fix service restart in smartmontools.generate_smartd_opts.in (bnc#900099). The file will be re-generated either on update or after editing parameters in yast2 sysconfig. The fix should be already in 13.2. Please check your /usr/lib/smartmontools/generate_smartd_opts. If it contains corrected comment, then something gone wrong. (Script skipped on update or so.) Comment 3: Several other sysconfig files use "Command:" to activate edit. YaST does it automatically, and people editing it manually should know it, or at least think about comment on the top: ## Command: /usr/lib/smartmontools/generate_smartd_opts There is still one reference to the init script: # Following code must be in sync with sysv init script! This warns about keeping of compatibility with older distros. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=900099 Stanislav Brabec <sbrabec@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(schuetzm@gmx.net) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=900099 Marc Schütz <schuetzm@gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(schuetzm@gmx.net) | --- Comment #7 from Marc Schütz <schuetzm@gmx.net> --- (In reply to Stanislav Brabec from comment #6)
Marc Schütz:
This was already fixed by:
Tue Oct 7 22:55:04 CEST 2014 - sbrabec@suse.cz
- Fix service restart in smartmontools.generate_smartd_opts.in (bnc#900099).
The file will be re-generated either on update or after editing parameters in yast2 sysconfig.
The fix should be already in 13.2.
Please check your /usr/lib/smartmontools/generate_smartd_opts. If it contains corrected comment, then something gone wrong. (Script skipped on update or so.)
Indeed, the script contains the correct text. Somethings must have gone wrong with the update. I did the update shortly after 13.2 was released, so I'm afraid I cannot remember any unusual circumstances. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=900099 Stanislav Brabec <sbrabec@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(schuetzm@gmx.net) --- Comment #8 from Stanislav Brabec <sbrabec@suse.com> --- If you are using Factory, you have a package with fix mentioned in changelog, and your /var/lib/smartmontools/smartd_opts still refers to an incorrect file, then something gone wrong and should be investigated. This file should have been re-generated just after the release of fixed package. The time stamp should match install time, or it could be newer, if you used YaST to edit smartd options. If the time stamp is older than install date of the last smartmontools update, something gone wrong. Could you check your YaST/zypp logs? Maybe you can find there a failure of smartmontools script. Note that I improved comment referring to the init script to make it clean what it means: https://build.opensuse.org/request/show/290215 -# Following code must be in sync with sysv init script! +# Following code should be in sync with sysv init script for older distros! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=900099 Marc Schütz <schuetzm@gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(schuetzm@gmx.net) | --- Comment #9 from Marc Schütz <schuetzm@gmx.net> --- (In reply to Stanislav Brabec from comment #8)
If you are using Factory, you have a package with fix mentioned in changelog, and your /var/lib/smartmontools/smartd_opts still refers to an incorrect file, then something gone wrong and should be investigated.
This file should have been re-generated just after the release of fixed package. The time stamp should match install time, or it could be newer, if you used YaST to edit smartd options.
If the time stamp is older than install date of the last smartmontools update, something gone wrong.
Could you check your YaST/zypp logs? Maybe you can find there a failure of smartmontools script.
This is from /var/log/zypp/history: # 2012-11-22 21:35:56 smartmontools-5.42-8.1.3.x86_64.rpm installed ok # Additional rpm output: # Updating /etc/sysconfig/smartmontools... # 2012-11-22 21:35:56|install|smartmontools|5.42-8.1.3|x86_64||openSUSE-12.2-1.6|00bf732223d3a9c8e3ae08f93acc529281ef8fa3b9debe91c365ce0dc5c61869 ... # 2013-01-01 20:52:02 smartmontools-6.0-8.4.1.x86_64.rpm installed ok # Additional rpm output: # Updating /etc/sysconfig/smartmontools... # redirecting to systemctl # 2013-01-01 20:52:02|install|smartmontools|6.0-8.4.1|x86_64||repo-update|f07aa13daa4cd143c72a1b45a96ab57afb04b1701868931eb86aa96f18b97f31 ... # 2013-03-20 18:55:27 smartmontools-6.0-5.1.1.x86_64.rpm installed ok # Additional rpm output: # Updating /etc/sysconfig/smartmontools... # redirecting to systemctl try-restart smartd # 2013-03-20 18:55:27|install|smartmontools|6.0-5.1.1|x86_64||openSUSE-12.2-1.6|ab0596d12bde1b4b6202d6bdd3d8a396b1b50764a5035dc94bb75912bee6c40f| ... # 2013-11-19 22:31:08 smartmontools-6.2-2.1.2.x86_64.rpm installed ok # Additional rpm output: # Updating /etc/sysconfig/smartmontools... # /var/tmp/rpm-tmp.pEP8AP: line 8: /etc/init.d/smartd: No such file or directory # 2013-11-19 22:31:08|install|smartmontools|6.2-2.1.2|x86_64||openSUSE-13.1|97c1928b64ef47dd165b9f2dd1f24efa5ebccb928ee5af70c32c3bcc3933a358| ... # 2014-11-04 20:36:30 smartmontools-6.3-2.1.x86_64.rpm installed ok # Additional rpm output: # Updating /etc/sysconfig/smartmontools... # 2014-11-04 20:36:30|install|smartmontools|6.3-2.1|x86_64||openSUSE-13.2|2651fb4d85c4e29e56032a1462999664a999e20c| Evidently the update to 13.1 on 2013-11-19 went wrong. But there's the question why it was downgraded on 2013-03-20. I can't remember whether I did this intentionally. Anyway, /var/lib/smartmontools/smartd_opts has an mtime of 2014-11-04, the time of the update to 13.2! # LANG=C stat /var/lib/smartmontools/smartd_opts File: ‘/var/lib/smartmontools/smartd_opts’ Size: 74 Blocks: 8 IO Block: 4096 regular file Device: 802h/2050d Inode: 1060421 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2015-03-12 10:04:25.989419900 +0100 Modify: 2014-11-04 20:36:30.191641296 +0100 Change: 2014-11-04 20:36:30.191641296 +0100 Birth: - A wild guess: maybe the update script was run as preinstall and still used the old generator? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=900099 --- Comment #10 from Stanislav Brabec <sbrabec@suse.com> --- Downgrade is a standard behavior of ZYPP in DUP mode (distro upgrade). I have no idea how it happened. I reviewed the code, and /usr/lib/smartmontools/generate_smartd_opts is the only place referring to /var/lib/smartmontools/smartd_opts. (rpm itself knows it as %ghost, i. e. file that is not accessed by rpm except uninstallation.) The script is called from %post. It is called after fillup. And the comment with a correct path is hardcoded to the only echo creating the file. If something failed, then the file would not be created nor time stamp updated. The additional text "Updating /etc/sysconfig/smartmontools..." comes from %{fillup_only}. /usr/lib/smartmontools/generate_smartd_opts was called just after that. Well, and I cannot reproduce while trying to upgrade from the older 6.2 package. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=900099 Swamp Workflow Management <swamp@suse.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Whiteboard| |obs:running:7001:low -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=900099 http://bugzilla.suse.com/show_bug.cgi?id=900099#c11 --- Comment #11 from Swamp Workflow Management <swamp@suse.de> --- openSUSE-RU-2017:1949-1: An update that has three recommended fixes can now be installed. Category: recommended (low) Bug References: 900099,983938,999541 CVE References: Sources used: openSUSE Leap 42.3 (src): smartmontools-6.5-8.1 openSUSE Leap 42.2 (src): smartmontools-6.5-5.3.1 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=900099 Swamp Workflow Management <swamp@suse.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Whiteboard|obs:running:7001:low | -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=900099 Swamp Workflow Management <swamp@suse.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Whiteboard| maint:planned:update |maint:planned:update | |ibs:running:6682:moderate -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=900099 Swamp Workflow Management <swamp@suse.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Whiteboard|maint:planned:update |ibs:running:6682:moderate |ibs:running:6682:moderate | -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=900099 Swamp Workflow Management <swamp@suse.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Whiteboard|ibs:running:6682:moderate | -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=900099 http://bugzilla.suse.com/show_bug.cgi?id=900099#c12 --- Comment #12 from Swamp Workflow Management <swamp@suse.de> --- SUSE-RU-2018:1649-1: An update that has 5 recommended fixes can now be installed. Category: recommended (moderate) Bug References: 1038271,1047198,1080611,900099,983938 CVE References: Sources used: SUSE OpenStack Cloud 7 (src): smartmontools-6.6-6.3.3 SUSE Linux Enterprise Server for SAP 12-SP2 (src): smartmontools-6.6-6.3.3 SUSE Linux Enterprise Server for SAP 12-SP1 (src): smartmontools-6.6-6.3.3 SUSE Linux Enterprise Server 12-SP3 (src): smartmontools-6.6-6.3.3 SUSE Linux Enterprise Server 12-SP2-LTSS (src): smartmontools-6.6-6.3.3 SUSE Linux Enterprise Server 12-SP1-LTSS (src): smartmontools-6.6-6.3.3 SUSE Linux Enterprise Server 12-LTSS (src): smartmontools-6.6-6.3.3 SUSE Linux Enterprise Desktop 12-SP3 (src): smartmontools-6.6-6.3.3 SUSE Enterprise Storage 4 (src): smartmontools-6.6-6.3.3 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=900099 http://bugzilla.suse.com/show_bug.cgi?id=900099#c13 --- Comment #13 from Swamp Workflow Management <swamp@suse.de> --- SUSE-RU-2018:1649-2: An update that has 5 recommended fixes can now be installed. Category: recommended (moderate) Bug References: 1038271,1047198,1080611,900099,983938 CVE References: Sources used: SUSE Linux Enterprise Server 12-SP2-BCL (src): smartmontools-6.6-6.3.3 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=900099 http://bugzilla.suse.com/show_bug.cgi?id=900099#c14 Marketa Calabkova <mcalabkova@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |RESOLVED CC| |mcalabkova@suse.com Resolution|--- |FIXED --- Comment #14 from Marketa Calabkova <mcalabkova@suse.com> --- This was fixed but never closed because another unreproducible issue occured. Closing. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com