Bug 1378092
| Summary: | Do not change /etc/motd | ||
|---|---|---|---|
| Product: | [oVirt] ovirt-node | Reporter: | Jiri Belka <jbelka> | 
| Component: | General | Assignee: | Ryan Barry <rbarry> | 
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Huijuan Zhao <huzhao> | 
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 4.0 | CC: | bugs, rbarry | 
| Target Milestone: | ovirt-4.1.0-beta | Flags: | rule-engine:
                ovirt-4.1+ rule-engine: planning_ack+ fdeutsch: devel_ack+ ycui: testing_ack+ | 
| Target Release: | 4.1 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | ovirt-node-ng-4.1.0-0.20161220.0.el7 | Doc Type: | If docs needed, set a value | 
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-02-01 14:34:44 UTC | Type: | Bug | 
| Regression: | --- | Mount Type: | --- | 
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Node | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1379143 | ||
| Putting a script into /etc/profile.d/ sounds like a good improvement! The sysadmin can get already rid of it by disabling the imgbased-motd.service. (In reply to Fabian Deutsch from comment #1) > Putting a script into /etc/profile.d/ sounds like a good improvement! > > The sysadmin can get already rid of it by disabling the > imgbased-motd.service. Just take care this should not slow down every shell opening (if something would go wrong). Thx. I'll grab this as part of rhbz#1379154 Test version: 1. Before upgrade: redhat-virtualization-host-4.1-0.20170112.1 imgbased-0.9.4-0.1.el7ev.noarch kernel-3.10.0-514.2.2.el7.x86_64 redhat-virtualization-host-image-update-placeholder-4.1-0.5.el7.noarch 2. After upgrade: redhat-virtualization-host-4.1-0.20170116.0 imgbased-0.9.4-0.1.el7ev.noarch kernel-3.10.0-514.2.2.el7.x86_64 redhat-virtualization-host-image-update-4.1-20170116.0.el7_3.noarch Test steps: 1. Install redhat-virtualization-host-4.1-0.20170112.1 2. Reboot and login RHVH, edit /etc/motd 3. Setup local repos and update RHVH to redhat-virtualization-host-4.1-0.20170116.0 # yum update 4. Reboot and login new RHVH-4.1-0.20170116.0, see what is in /etc/motd Test results: After step4, /etc/motd has same content edited in step2 So this bug is fixed in redhat-virtualization-host-4.1-0.20170116.0, change the status to VERIFIED | 
Description of problem: IIUC /etc/motd is not dynamically changed on EL, thus keep it this way and do not change it. Bogus action is here: # cat /usr/lib/systemd/system/imgbase-motd.service [Unit] Description=Build motd based on imgbase analysis [Service] ExecStart=/usr/sbin/imgbase motd --update Type=oneshot RemainAfterExit=yes [Install] WantedBy=multi-user.target /etc/motd is sysadmin ownership, if you want to have any "info" after login, just put something into /etc/profile.d/ as this can be "customized" by sysadmin to disable "your info" if it would be conceived as annoying, as...: # sed -n '/^for.*profile.d/,/done$/p' /etc/profile for i in /etc/profile.d/*.sh ; do if [ -r "$i" ]; then if [ "${-#*i}" != "$-" ]; then . "$i" else . "$i" >/dev/null fi fi done Thus with this solution a sysadmin could remove read bit and get rid of imgbase info. (At least Debian offers /etc/motd.tail but IIUC there's nothing on EL.) Version-Release number of selected component (if applicable): redhat-virtualization-host-image-update-4.0-20160906.0.el7_2.noarch How reproducible: 100% Steps to Reproduce: 1. edit /etc/motd 2. update redhat-virtualization-host-image-update 3. see what is in /etc/motd Actual results: redhat-virtualization-host-image-update messes with /etc/motd which is traditionally not dynamically updated on EL and thus "steals" a sysadmin's responsibility of /etc/motd content Expected results: /etc/motd should be either empty as it is on EL by default or /etc/motd should always have content edited by responsible admin (ie. never dynamically changed by any rpm) Additional info: ngn is here because legacy node was detracting too far from EL standards and user experience, thus conform to this goal, thx.