Zhou Zheng Sheng has posted comments on this change.

Change subject: vdsmd.init.in: simplify system services management by using 
vdsm-tool
......................................................................


Patch Set 3: (2 inline comments)

....................................................
File vdsm/vdsmd.init.in
Line 32: CORE_DUMP_PATH=/var/log/core/core.%p.%t.dump
Line 33: DOM_METADATA_BACKUP_DIR=/var/log/vdsm/backup
Line 34: CORE_PATTERN=/proc/sys/kernel/core_pattern
Line 35: QEMU_DUMP_PATH="/var/log/core"
Line 36: NEEDED_SERVICES="iscsid multipathd ntpd wdmd sanlock network libvirtd"
Thanks Yaniv. When the libvirtd is configured already, the configure_libvirt 
will return early without restarting libvirtd. In the original code, after 
configuring libvirtd, there is a line as follow

 start_needed_srv && start_libvirtd && syslog_available

We actually need to invoke start_libvirtd after the configure_libvirt. After I 
refactor most of the nasty things into the libvirtd_sysv2upstart function, I 
think there is no need to start libvirtd differently to other dependency 
services here.

So I change it to

  start_needed_srv && syslog_available

I think this is cleaner. We deal with all the dependencies in a general way and 
put all other specific things in a function and maintain them in that function, 
the specific things will not leaked outside the function and makes the whole 
script simpler. The configure_libvirt and start_needed_srv does not know each 
other as well. When you look at them separately, they all look clean. The 
start_needed_srv detects the service status before start it, so the libvirtd 
will not be started twice.
Line 37: CONFLICTING_SERVICES="libvirt-guests"
Line 38: 
Line 39: # trigger for reconfiguration
Line 40: FORCE_RECONFIGURE=@VDSMLIBDIR@/reconfigure


Line 162:             fi
Line 163:         fi
Line 164:     done
Line 165: 
Line 166:     @SERVICE_PATH@ iscsid force-start
Thanks Ewoud and Yaniv, I think force-start here is very specific to iscsid on 
the Fedora and RHEL. In Ubuntu I can not find a equivalent operation for the 
open-iscsi service. In systemd and upstart, there is no general operation 
equivalent to force-start, so I decide not to abstract it.
Line 167: }
Line 168: 
Line 169: test_lo() {
Line 170:     if ! LC_ALL=C /sbin/ip link show lo | /bin/grep -q UP;


--
To view, visit http://gerrit.ovirt.org/13702
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I57a89d969b8ff4eba57daa893dc29840358c30e7
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]>
Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: Yeela Kaplan <[email protected]>
Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to