Feature #2067
Lib: synchronize service status prop and chkconfig
Status: | CLOSED | Start date: | 07/17/2013 | |
---|---|---|---|---|
Priority: | Normal | Due date: | 07/17/2013 | |
Assignee: | - | % Done: | 100% | |
Category: | nethserver-lib | |||
Target version: | v6.4-beta2 | |||
Resolution: | NEEDINFO: | No |
Description
When the prop status
of a service
record is switched between enabled/disabled state, the change must be reflected into runlevel config using chkconfig
command.
This is what runlevel-adjust
action does. Also adjust-services
must perform the same action.
Related issues
Associated revisions
NethServer::Service (is_enabled): ignore service Runlevels prop and current system runlevel value; returns the value of the status prop. Refs #2067
NethServer::Service (set_service_startup): control the service startup status through chkconfig. Refs #2067
adjust-services action: synchronize service startup status with "status" prop. Refs #2067
runlevel-adjust action: Synchronize service status with "status" prop. Runlevels prop is no longer considered. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
db defaults: remove Runlevels prop. Refs #2067
History
#1 Updated by Davide Principi about 8 years ago
- Status changed from TRIAGED to ON_DEV
- % Done changed from 20 to 30
#2 Updated by Davide Principi about 8 years ago
- Tracker changed from Enhancement to Feature
- Assignee deleted (
Davide Principi)
Runlevels
prop is no longer required in a service configuration. Updated RPM package rules document.
#3 Updated by Davide Principi about 8 years ago
- Status changed from ON_DEV to MODIFIED
- % Done changed from 30 to 70
#4 Updated by Davide Principi about 8 years ago
- Status changed from MODIFIED to ON_QA
- % Done changed from 70 to 80
Test case
System behaviour must be unchanged, except for automatic chkconfig
execution whenever a service is manipulated by adjust-services
system action.
Check the chkconfig
output when state={enabled,disabled}
prop of a service is changed and adjust-services
is called.
In nethserver-testing repository:
- nethserver-lib-1.2.0-1.ns6.noarch.rpm
- nethserver-base-1.3.1-1.ns6.noarch.rpm
#5 Updated by Davide Principi about 8 years ago
- Status changed from ON_QA to ON_DEV
- Assignee set to Davide Principi
- % Done changed from 80 to 30
I've noticed this message in /var/log/messages:
Jul 19 08:46:23 davidep2 esmith::event[1881]: Processing event: runlevel-adjust Jul 19 08:46:23 davidep2 esmith::event[1881]: Running event handler: /etc/e-smith/events/runle vel-adjust/S20runlevel-adjust Jul 19 08:46:24 davidep2 esmith::event[1881]: bootstrap-console: unrecognized service
Previously runlevel-adjust
used to ignore bootstrap-console
because was missing the Runlevels
prop. See #2079
#6 Updated by Davide Principi about 8 years ago
- Status changed from ON_DEV to MODIFIED
- Assignee deleted (
Davide Principi) - % Done changed from 30 to 70
#7 Updated by Davide Principi about 8 years ago
- Status changed from MODIFIED to ON_QA
- % Done changed from 70 to 80
- nethserver-base-1.4.0-1.ns6.noarch.rpm
- nethserver-lib-1.3.0-1.ns6.noarch.rpm
- nethserver-yum-1.1.1-1.ns6.noarch.rpm
- nethserver-nethgui-1.2.2-1.ns6.noarch.rpm
#8 Updated by Giacomo Sanchietti about 8 years ago
- Assignee set to Giacomo Sanchietti
#9 Updated by Giacomo Sanchietti about 8 years ago
- Status changed from ON_QA to VERIFIED
- Assignee deleted (
Giacomo Sanchietti) - % Done changed from 70 to 90
Tested with smartd service:
Smartd enabled and running:
[root@test ~]# config getprop smartd status enabled [root@test ~]# chkconfig --list | grep smartd smartd 0:off 1:off 2:on 3:on 4:on 5:on 6:off [root@test ~]# ps aux | grep smartd root 3273 0.0 0.1 18828 848 ? S 17:29 0:00 /usr/sbin/smartd -q never
Disabling smartd:
[root@test ~]# config setprop smartd status disabled [root@test ~]# /etc/e-smith/events/actions/adjust-services nethserver-smartd-update Shutting down smartd: [ OK ] [INFO] smartd is disabled and has been stopped [root@test ~]# chkconfig --list | grep smartd smartd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
Marking as VERIFIED
#10 Updated by Davide Principi about 8 years ago
- Status changed from VERIFIED to CLOSED
- % Done changed from 90 to 100
Moved to nethserver-updates repository