~ubuntu-branches/ubuntu/utopic/maas/utopic-security

« back to all changes in this revision

Viewing changes to debian/maas-cluster-controller.maas-clusterd.upstart

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez, Jeroen Vermeulen, Andres Rodriguez, Jason Hobbs, Raphaël Badin, Louis Bouchard, Gavin Panella
  • Date: 2014-08-21 19:36:30 UTC
  • mfrom: (1.3.1)
  • Revision ID: package-import@ubuntu.com-20140821193630-kertpu5hd8yyss8h
Tags: 1.7.0~beta7+bzr3266-0ubuntu1
* New Upstream Snapshot, Beta 7 bzr3266

[ Jeroen Vermeulen ]
* debian/extras/99-maas-sudoers
  debian/maas-dhcp.postinst
  debian/rules
  - Add second DHCP server instance for IPv6.
* debian/maas-region-controller-min.install
  debian/maas-region-controller-min.lintian-overrides
  - Install deployment user-data: maas_configure_interfaces.py script.
* debian/maas-cluster-controller.links
  debian/maas-cluster-controller.install
  debian/maas-cluster-controller.postinst
  - Reflect Celery removal changes made in trunk r3067.
  - Don't install celeryconfig_cluster.py any longer. 
  - Don't install maas_local_celeryconfig_cluster.py any longer.
  - Don't symlink maas_local_celeryconfig_cluster.py from /etc to /usr.
  - Don't insert UUID into maas_local_celeryconfig_cluster.py.

[ Andres Rodriguez ]
* debian/maas-region-controller-min.postrm: Cleanup lefover files.
* debian/maas-dhcp.postrm: Clean leftover configs.
* Provide new maas-proxy package that replaces the usage of
  squid-deb-proxy:
  - debian/control: New maas-proxy package that replaces the usage
    of squid-deb-proxy; Drop depends on squid-deb-proxy.
  - Add upstrart job.
  - Ensure squid3 is stopped as maas-proxy uses a caching proxy.
* Remove Celery references to cluster controller:
  - Rename upstart job from maas-pserv to maas-cluster; rename
    maas-cluster-celery to maas-cluster-register. Ensure services
    are stopped on upgrade.
  - debian/maintscript: Cleanup config files.
  - Remove all references to the MAAS celery daemon and config
    files as we don't use it like that anymore
* Move some entries in debian/maintscript to
  debian/maas-cluster-controller.maintscript
* Remove usage of txlongpoll and rabbitmq-server. Handle upgrades
  to ensure these are removed correctly.

[ Jason Hobbs ]
* debian/maas-region-controller-min.install: Install
  maas-generate-winrm-cert script.

[ Raphaël Badin ]
* debian/extras/maas-region-admin: Bypass django-admin as it prints
  spurious messages to stdout (LP: #1365130).

[Louis Bouchard]
* debian/maas-cluster-controller.postinst:
  - Exclude /var/log/maas/rsyslog when changing ownership
    (LP: #1346703)

[Gavin Panella]
* debian/maas-cluster-controller.maas-clusterd.upstart:
  - Don't start-up the cluster controller unless a shared-secret has
    been installed.
* debian/maas-cluster-controller.maas-cluster-register.upstart: Drop.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# maas-cluster - provisioning service
 
2
#
 
3
# MAAS Provisioning Service
 
4
 
 
5
description     "MAAS"
 
6
author "Andres Rodriguez <andres.rodriguez@canonical.com>"
 
7
 
 
8
start on filesystem and net-device-up
 
9
stop on runlevel [016]
 
10
 
 
11
respawn
 
12
 
 
13
env CONFIG_FILE=/etc/maas/maas_cluster.conf
 
14
 
 
15
pre-start script
 
16
    if [ ! -f $CONFIG_FILE ]; then
 
17
        echo "$CONFIG_FILE does not exist.  Aborting."
 
18
        stop
 
19
        exit 0
 
20
    fi
 
21
end script
 
22
 
 
23
script
 
24
    # Exit immediately on error, and treat unset variables as errors. In
 
25
    # sh/dash, unfortunately, the following does not cause the use of an unset
 
26
    # variable to halt the script, it merely prints an error and sets $?.
 
27
    set -o errexit -o nounset
 
28
    # Load the configuration file.
 
29
    . $CONFIG_FILE
 
30
    # The MAAS cluster controller needs both CLUSTER_UUID and MAAS_URL to
 
31
    # operate.
 
32
    export CLUSTER_UUID
 
33
    export MAAS_URL
 
34
    # Check for the shared-secret. If it's not here, sleep for a while, then
 
35
    # exit and allow respawn to do its thing.
 
36
    if ! maas-provision check-for-shared-secret >/dev/null; then
 
37
        fmt -w 72 <<-'EOF' >&2
 
38
        A shared secret has not been installed for this cluster. Obtain
 
39
        the secret from the region (find it in /var/lib/maas/secret once
 
40
        the region controller has started for the first time) and
 
41
        install it with `maas-provision install-shared-secret`.
 
42
 
 
43
        However, if this machine is also serving as the region, ensure
 
44
        that the region controller is started (`sudo service apache2
 
45
        start` typically). It will create the shared secret, which
 
46
        maas-clusterd will then find when it respawns in 5 seconds.
 
47
 
 
48
        EOF
 
49
        exec sleep 5
 
50
    fi
 
51
    # To add options to your daemon, edit the line below:
 
52
    exec /usr/bin/authbind --deep /usr/bin/twistd \
 
53
        --nodaemon --uid=maas --gid=maas --pidfile=/run/maas-cluster.pid \
 
54
        --logfile=/dev/null maas-pserv --config-file=/etc/maas/pserv.yaml
 
55
end script