Feature #2067

Lib: synchronize service status prop and chkconfig

Added by Davide Principi about 8 years ago. Updated about 8 years ago.

Status:CLOSEDStart date:07/17/2013
Priority:NormalDue 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

Related to NethServer 6 - Feature #2078: Lib: synchronize service status prop and running state CLOSED 07/23/2013 07/23/2013
Related to NethServer 6 - Enhancement #2079: Base: bootstrap-console type default is "configuration" CLOSED 07/25/2013 07/25/2013
Related to NethServer 6 - Enhancement #2080: Use files instead of symlinks for services2adjust CLOSED
Related to NethServer 6 - Feature #1760: NUT UPS configuration CLOSED

Associated revisions

Revision 630a6d38
Added by Davide Principi about 8 years ago

NethServer::Service (is_enabled): ignore service Runlevels prop and current system runlevel value; returns the value of the status prop. Refs #2067

Revision c06b3aff
Added by Davide Principi about 8 years ago

NethServer::Service (set_service_startup): control the service startup status through chkconfig. Refs #2067

Revision a83345aa
Added by Davide Principi about 8 years ago

adjust-services action: synchronize service startup status with "status" prop. Refs #2067

Revision 9beef82e
Added by Davide Principi about 8 years ago

runlevel-adjust action: Synchronize service status with "status" prop. Runlevels prop is no longer considered. Refs #2067

Revision f6ce9097
Added by Giacomo Sanchietti about 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision e3dbe07c
Added by Davide Principi almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision b4e2ef2d
Added by Davide Principi almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision db3397e4
Added by Davide Principi almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision ef839dc2
Added by Davide Principi almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision 00355d31
Added by Davide Principi almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision e313c034
Added by Davide Principi almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision 1aea335a
Added by Davide Principi almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision a2ef8074
Added by Davide Principi almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision 88118784
Added by Davide Principi almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision 8539c0fd
Added by Davide Principi almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision 605f97b7
Added by Giacomo Sanchietti almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision 3121e787
Added by Giacomo Sanchietti almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision a16433e9
Added by Giacomo Sanchietti almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision f320dd9d
Added by Giacomo Sanchietti almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision a2637709
Added by Giacomo Sanchietti almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision 99e0f521
Added by Giacomo Sanchietti almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision 5a328030
Added by Giacomo Sanchietti almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision 18d61828
Added by Giacomo Sanchietti almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision 7257620f
Added by Giacomo Sanchietti almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision 4f3476d8
Added by Giacomo Sanchietti almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision bbb3b059
Added by Giacomo Sanchietti almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision 743ad601
Added by Giacomo Sanchietti almost 8 years ago

db defaults: remove Runlevels prop. Refs #2067

Revision 6117413d
Added by Giacomo Sanchietti almost 8 years ago

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
In nethserver-testing:
  • 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

Also available in: Atom PDF