On Mon, Dec 19, 2016 at 12:36:57PM +0100, Wolfgang Link wrote:
> The pve-ceph-disk.service ensure that ceph will start after pve-cluster and 
> mount the osd-disks.
> This is essential because ceph (osd, mon, mds, disks) need the ceph.conf 
> which is located in the pmxcfs.
> Also there is a race condition in the ceph.serivce scritps, what end in a 
> stopped osd.
> 
> To use this service you have to unmask the ceph.service and enable the 
> pve-ceph-disk.service
> ---
>  bin/init.d/Makefile              | 11 ++++++++++-
>  bin/init.d/pve-ceph-disk.service | 11 +++++++++++
>  bin/init.d/pve.conf              |  2 ++
>  3 files changed, 23 insertions(+), 1 deletion(-)
>  create mode 100644 bin/init.d/pve-ceph-disk.service
>  create mode 100644 bin/init.d/pve.conf
> 
> diff --git a/bin/init.d/Makefile b/bin/init.d/Makefile
> index 76498b7..14c8659 100644
> --- a/bin/init.d/Makefile
> +++ b/bin/init.d/Makefile
> @@ -17,7 +17,8 @@ SERVICES=                   \
>       pve-manager.service     \
>       pvedaemon.service       \
>       pveproxy.service        \
> -     spiceproxy.service 
> +     spiceproxy.service      \
> +     pve-ceph-disk.service
>  
>  .PHONY: install 
>  install: ${SCRIPTS}
> @@ -25,6 +26,14 @@ install: ${SCRIPTS}
>       install -m 0755 ${SCRIPTS} ${INITDBINDIR}
>       install -d ${SERVICEDIR}
>       install -m 0644 ${SERVICES} ${SERVICEDIR}
> +     install -d ${SERVICEDIR}/[email protected]
> +     install -m 0644 pve.conf ${SERVICEDIR}/[email protected]
> +     install -d ${SERVICEDIR}/[email protected]
> +     install -m 0644 pve.conf ${SERVICEDIR}/[email protected]
> +     install -d ${SERVICEDIR}/[email protected]
> +     install -m 0644 pve.conf ${SERVICEDIR}/[email protected]
> +     install -d ${SERVICEDIR}/[email protected]
> +     install -m 0644 pve.conf ${SERVICEDIR}/[email protected]
>  
>  .PHONY: clean
>  clean:
> diff --git a/bin/init.d/pve-ceph-disk.service 
> b/bin/init.d/pve-ceph-disk.service
> new file mode 100644
> index 0000000..3fff72b
> --- /dev/null
> +++ b/bin/init.d/pve-ceph-disk.service
> @@ -0,0 +1,11 @@
> +[Unit]
> +Description=PVE Ceph disks
> +After=pve-cluster.service
> +Requires=pve-cluster.service
> +
> +[Service]
> +ExecStart=/usr/sbin/ceph-disk activate-all

this should get a
Type=oneshot
as well.

> +
> +[Install]
> [email protected] [email protected] [email protected] 
> [email protected]
> +WantedBy=ceph.target
> diff --git a/bin/init.d/pve.conf b/bin/init.d/pve.conf
> new file mode 100644
> index 0000000..655dbc7
> --- /dev/null
> +++ b/bin/init.d/pve.conf
> @@ -0,0 +1,2 @@
> +[Unit]
> +After=pve-ceph-disk.service
> -- 
> 2.1.4
> 
> 
> _______________________________________________
> pve-devel mailing list
> [email protected]
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

_______________________________________________
pve-devel mailing list
[email protected]
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to