Grouping service units for bulk stop/start ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With OpenStack there are quite a large number of daemons per host, each
of which has their own .service unit file.

  openstack-glance-api.service
  openstack-glance-registry.service
  openstack-keystone.service
  openstack-nova-api.service
  openstack-nova-cert.service
  openstack-nova-compute.service
  openstack-nova-network.service
  openstack-nova-objectstore.service
  openstack-nova-scheduler.service
  openstack-nova-volume.service
  openstack-swift-account.service
  openstack-swift-container.service
  openstack-swift-object.service
  openstack-swift-proxy.service

Currently our OpenStack instructions have such fun commands as:

 # for svc in api registry; do sudo systemctl start openstack-glance-$svc.service; done
 # for svc in api objectstore compute network volume scheduler cert; do sudo systemctl start openstack-nova-$svc.service; done

What I'd like to be able todo is setup some kind of grouping, so that
you can just start/stop/check status of everything in simple commands
like:

 # sudo systemctl start openstack-nova.target
 # sudo systemctl status openstack-nova.target
 # sudo systemctl stop openstack-nova.target

My naive attempt to make this work was todo

 - Create a openstack-nova.target containining

   [Unit]
   Description=OpenStack Nova
   WantedBy=multi-user.target

 - Edit each of openstack-nova-XXX.service to change
   WantedBy=multi-user.target to WantedBy=openstack-nova.target

But after doing this, stopping/starting the target has no effect on the
running state of units I associated with it. Also I'd like starting/stopping
XXX.target to take account of the enablement state of the individual
XXX-YYY.service files. eg so I can disable say, openstack-nova-network.service
on a host, but still use  openstack-nova.target to bulk stop/start all the
other services that are enabled.

Either I'm missing some config change, or what I'm attempting is just not
the kind of functionality that .target files are intended to offer ?

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux