[pve-devel] [RFC pve-storage 3/3] include pve-replica cronjob.

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Apr 5 12:07:44 CEST 2017


On 04/03/2017 04:53 PM, Wolfgang Link wrote:
> This is the timer for pverepm run.

How about using a systemd timer? We would get logs in the journal and 
could also filter after it.
And adding network or IO rate limiting through cgroups to the replica 
jobs would be easier, I guess.

> ---
>   Makefile    | 5 +++++
>   conffiles   | 2 ++
>   pve-replica | 3 +++
>   3 files changed, 10 insertions(+)
>   create mode 100644 conffiles
>   create mode 100644 pve-replica
>
> diff --git a/Makefile b/Makefile
> index 54c774b..7850128 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -10,6 +10,8 @@ MANDIR=${PREFIX}/share/man
>   DOCDIR=${PREFIX}/share/doc/${PACKAGE}
>   MAN1DIR=${MANDIR}/man1/
>   BASHCOMPLDIR=${PREFIX}/share/bash-completion/completions/
> +CRONDIR=/etc/cron.d
> +CRONREPLICA=${CRONDIR}/pve-replica
>   
>   export PERLDIR=${PREFIX}/share/perl5
>   
> @@ -42,6 +44,8 @@ install: pvesm.1 pvesm.bash-completion pverepm.bash-completion
>   	install -d ${DESTDIR}${SBINDIR}
>   	install -m 0755 pvesm ${DESTDIR}${SBINDIR}
>   	install -m 0755 pverepm ${DESTDIR}${SBINDIR}
> +	install -d ${DESTDIR}${CRONDIR}
> +	install -m 0644 pve-replica ${DESTDIR}${CRONREPLICA}
>   	make -C PVE install
>   	install -d ${DESTDIR}/var/lib/pve-replica
>   	install -d ${DESTDIR}/usr/share/man/man1
> @@ -63,6 +67,7 @@ ${DEB}:
>   	install -D -m 0644 copyright debian/${DOCDIR}/copyright
>   	install -m 0644 changelog.Debian debian/${DOCDIR}/
>   	install -m 0644 triggers debian/DEBIAN
> +	install -m 0644 conffiles debian/DEBIAN
>   	gzip -9 -n debian/${DOCDIR}/changelog.Debian
>   	echo "git clone git://git.proxmox.com/git/pve-storage.git\\ngit checkout ${GITVERSION}" > debian/${DOCDIR}/SOURCE
>   	fakeroot dpkg-deb --build debian
> diff --git a/conffiles b/conffiles
> new file mode 100644
> index 0000000..724f897
> --- /dev/null
> +++ b/conffiles
> @@ -0,0 +1,2 @@
> +/etc/cron.d/pve-replica
> +
> diff --git a/pve-replica b/pve-replica
> new file mode 100644
> index 0000000..0b5db7e
> --- /dev/null
> +++ b/pve-replica
> @@ -0,0 +1,3 @@
> +#do no edit.
> +* * * * * root /usr/sbin/pverepm run
> +





More information about the pve-devel mailing list