Hello community, here is the log from the commit of package caasp-tools for openSUSE:Factory checked in at 2018-12-08 11:22:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/caasp-tools (Old) and /work/SRC/openSUSE:Factory/.caasp-tools.new.19453 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "caasp-tools" Sat Dec 8 11:22:04 2018 rev:21 rq:656083 version:1.0+git20181207.2d715d2 Changes: -------- --- /work/SRC/openSUSE:Factory/caasp-tools/caasp-tools.changes 2018-09-28 08:53:10.717748329 +0200 +++ /work/SRC/openSUSE:Factory/.caasp-tools.new.19453/caasp-tools.changes 2018-12-08 11:22:04.930741107 +0100 @@ -1,0 +2,10 @@ +Fri Dec 07 13:33:51 UTC 2018 - ku...@suse.de + +- Update to version 1.0+git20181207.2d715d2: + * Don't configure systemd-timesyncd anymore on the cluster nodes, admin has to use the ntp module, which can meanwhile configure everything. + * Fix formating of bash script + * Add service, which watches /etc/sysconfig/proxy and sets the environment variables for systemd services + * Fix product name + * Move cloud-init module for caasp into caasp special sub directory + +------------------------------------------------------------------- Old: ---- microos-tools-1.0+git20180926.e9f5cfe.tar.xz New: ---- microos-tools-1.0+git20181207.2d715d2.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ caasp-tools.spec ++++++ --- /var/tmp/diff_new_pack.CpFlkQ/_old 2018-12-08 11:22:05.538740526 +0100 +++ /var/tmp/diff_new_pack.CpFlkQ/_new 2018-12-08 11:22:05.542740522 +0100 @@ -17,7 +17,7 @@ Name: caasp-tools -Version: 1.0+git20180926.e9f5cfe +Version: 1.0+git20181207.2d715d2 Release: 0 Summary: Files and Scripts for SUSE CaaS Platform License: GPL-2.0-or-later @@ -51,7 +51,7 @@ mkdir -p %{buildroot}%{_mandir}/man8 pod2man %{SOURCE1} > %{buildroot}%{_mandir}/man8/create_autoyast_profile.8 mkdir -p %{buildroot}%{_docdir}/%{name} -install -D -m644 cloud-init/cc_suse_caasp.py %{buildroot}%{python3_sitelib}/cloudinit/config/cc_suse_caasp.py +install -D -m644 caasp/cloud-init/cc_suse_caasp.py %{buildroot}%{python3_sitelib}/cloudinit/config/cc_suse_caasp.py %pre %service_add_pre adjust-cloud-cfg.service setup-salt-minion.service @@ -94,6 +94,7 @@ %{_sbindir}/adjust-cloud-cfg %{_sbindir}/create_autoyast_profile %{_sbindir}/migrate-ntp2chrony +%{_sbindir}/setup-systemd-proxy-env %{_mandir}/man8/create_autoyast_profile.8* %changelog ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.CpFlkQ/_old 2018-12-08 11:22:05.570740495 +0100 +++ /var/tmp/diff_new_pack.CpFlkQ/_new 2018-12-08 11:22:05.570740495 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/kubic-project/microos-tools.git</param> - <param name="changesrevision">e9f5cfe44699ae487d5067ae167478f5299d4432</param> + <param name="changesrevision">2d715d28ec68863825c4bcea028be87302ccfe63</param> </service> </servicedata> \ No newline at end of file ++++++ microos-tools-1.0+git20180926.e9f5cfe.tar.xz -> microos-tools-1.0+git20181207.2d715d2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/microos-tools-1.0+git20180926.e9f5cfe/caasp/cloud-init/cc_suse_caasp.py new/microos-tools-1.0+git20181207.2d715d2/caasp/cloud-init/cc_suse_caasp.py --- old/microos-tools-1.0+git20180926.e9f5cfe/caasp/cloud-init/cc_suse_caasp.py 1970-01-01 01:00:00.000000000 +0100 +++ new/microos-tools-1.0+git20181207.2d715d2/caasp/cloud-init/cc_suse_caasp.py 2018-12-07 14:26:43.000000000 +0100 @@ -0,0 +1,71 @@ +# vi: ts=4 expandtab +# +# Copyright (C) 2017,2018 SUSE LLC +# +# Author: Thorsten Kukuk <ku...@suse.com> +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# in Version 2 or later as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +from cloudinit.settings import PER_INSTANCE +from cloudinit import util + +frequency = PER_INSTANCE + +DEFAULT_PERMS = 0o644 + +# suse_caasp: +# role: [admin|cluster] +# admin_node: admin-node.example.com + +def enable_service(service): + cmd = ['systemctl', 'enable', '--now', service] + util.subp(cmd, capture=True) + +def handle(name, cfg, cloud, log, args): + if len(args) != 0: + caasp_cfg = util.read_conf(args[0]) + else: + if 'suse_caasp' not in cfg: + log.debug(("Skipping module named %s, " + "no 'suse_caasp' configuration found"), name) + return + caasp_cfg = cfg['suse_caasp'] + + if 'role' not in caasp_cfg: + log.warn(("Skipping module named %s, " + "no 'role' found in 'suse_caasp' configuration"), name) + return + system_role = caasp_cfg['role'] + + if system_role == 'admin': + log.debug(("role administration node found")) + enable_service('admin-node-init') + enable_service('admin-node-setup') + enable_service('docker') + enable_service('etcd') + enable_service('kubelet') + enable_service('salt-minion') + elif system_role == 'cluster': + log.debug(("role cluster node found")) + if 'admin_node' not in caasp_cfg: + log.warn(("Skipping module named %s, " + "no 'admin_node' found for cluster system role"), name) + return + admin_node = caasp_cfg['admin_node'] + + contents = "master: %s" % (admin_node) + util.write_file('/etc/salt/minion.d/master.conf', contents, mode=DEFAULT_PERMS) + enable_service('docker') + enable_service('salt-minion') + else: + log.warn(("Unknown role %s, skipping module named %s"), role, name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/microos-tools-1.0+git20180926.e9f5cfe/cloud-init/cc_suse_caasp.py new/microos-tools-1.0+git20181207.2d715d2/cloud-init/cc_suse_caasp.py --- old/microos-tools-1.0+git20180926.e9f5cfe/cloud-init/cc_suse_caasp.py 2018-09-26 13:46:33.000000000 +0200 +++ new/microos-tools-1.0+git20181207.2d715d2/cloud-init/cc_suse_caasp.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,76 +0,0 @@ -# vi: ts=4 expandtab -# -# Copyright (C) 2017,2018 SUSE LLC -# -# Author: Thorsten Kukuk <ku...@suse.com> -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# in Version 2 or later as published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -from cloudinit.settings import PER_INSTANCE -from cloudinit import util - -frequency = PER_INSTANCE - -DEFAULT_PERMS = 0o644 - -# suse_caasp: -# role: [admin|cluster] -# admin_node: admin-node.example.com - -def enable_service(service): - cmd = ['systemctl', 'enable', '--now', service] - util.subp(cmd, capture=True) - -def handle(name, cfg, cloud, log, args): - if len(args) != 0: - caasp_cfg = util.read_conf(args[0]) - else: - if 'suse_caasp' not in cfg: - log.debug(("Skipping module named %s, " - "no 'suse_caasp' configuration found"), name) - return - caasp_cfg = cfg['suse_caasp'] - - if 'role' not in caasp_cfg: - log.warn(("Skipping module named %s, " - "no 'role' found in 'suse_caasp' configuration"), name) - return - system_role = caasp_cfg['role'] - - if system_role == 'admin': - log.debug(("role administration node found")) - enable_service('admin-node-init') - enable_service('admin-node-setup') - enable_service('docker') - enable_service('etcd') - enable_service('kubelet') - enable_service('salt-minion') - elif system_role == 'cluster': - log.debug(("role cluster node found")) - if 'admin_node' not in caasp_cfg: - log.warn(("Skipping module named %s, " - "no 'admin_node' found for cluster system role"), name) - return - admin_node = caasp_cfg['admin_node'] - - contents = "master: %s" % (admin_node) - util.write_file('/etc/salt/minion.d/master.conf', contents, mode=DEFAULT_PERMS) - sed_arg = "s|#NTP=.*|NTP=%s|g" % (admin_node) - cmd = ['sed', '-i', '-e', sed_arg, '/etc/systemd/timesyncd.conf'] - util.subp(cmd, capture=True) - - enable_service('systemd-timesyncd') - enable_service('docker') - enable_service('salt-minion') - else: - log.warn(("Unknown role %s, skipping module named %s"), role, name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/microos-tools-1.0+git20180926.e9f5cfe/usr/lib/systemd/system/MicroOS-firstboot.service new/microos-tools-1.0+git20181207.2d715d2/usr/lib/systemd/system/MicroOS-firstboot.service --- old/microos-tools-1.0+git20180926.e9f5cfe/usr/lib/systemd/system/MicroOS-firstboot.service 2018-09-26 13:46:33.000000000 +0200 +++ new/microos-tools-1.0+git20181207.2d715d2/usr/lib/systemd/system/MicroOS-firstboot.service 2018-12-07 14:26:43.000000000 +0100 @@ -1,5 +1,5 @@ [Unit] -Description=SLE MicroOS Firstboot Service +Description=openSUSE MicroOS Firstboot Service DefaultDependencies=no Conflicts=shutdown.target After=systemd-remount-fs.service diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/microos-tools-1.0+git20180926.e9f5cfe/usr/lib/systemd/system/setup-systemd-proxy-env.path new/microos-tools-1.0+git20181207.2d715d2/usr/lib/systemd/system/setup-systemd-proxy-env.path --- old/microos-tools-1.0+git20180926.e9f5cfe/usr/lib/systemd/system/setup-systemd-proxy-env.path 1970-01-01 01:00:00.000000000 +0100 +++ new/microos-tools-1.0+git20181207.2d715d2/usr/lib/systemd/system/setup-systemd-proxy-env.path 2018-12-07 14:26:43.000000000 +0100 @@ -0,0 +1,11 @@ +[Unit] +Description=Watch for changes in proxy configuration +After=local-fs.target + +[Path] +Unit=setup-systemd-proxy-env.service +PathChanged=/etc/sysconfig/proxy + +[Install] +WantedBy=default.target + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/microos-tools-1.0+git20180926.e9f5cfe/usr/lib/systemd/system/setup-systemd-proxy-env.service new/microos-tools-1.0+git20181207.2d715d2/usr/lib/systemd/system/setup-systemd-proxy-env.service --- old/microos-tools-1.0+git20180926.e9f5cfe/usr/lib/systemd/system/setup-systemd-proxy-env.service 1970-01-01 01:00:00.000000000 +0100 +++ new/microos-tools-1.0+git20181207.2d715d2/usr/lib/systemd/system/setup-systemd-proxy-env.service 2018-12-07 14:26:43.000000000 +0100 @@ -0,0 +1,11 @@ +[Unit] +Description=Update system wide proxy setup for systemd services +Wants=local-fs.target + +[Service] +Type=oneshot +ExecStart=/usr/sbin/setup-systemd-proxy-env + +[Install] +WantedBy=default.target + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/microos-tools-1.0+git20180926.e9f5cfe/usr/sbin/setup-systemd-proxy-env new/microos-tools-1.0+git20181207.2d715d2/usr/sbin/setup-systemd-proxy-env --- old/microos-tools-1.0+git20180926.e9f5cfe/usr/sbin/setup-systemd-proxy-env 1970-01-01 01:00:00.000000000 +0100 +++ new/microos-tools-1.0+git20181207.2d715d2/usr/sbin/setup-systemd-proxy-env 2018-12-07 14:26:43.000000000 +0100 @@ -0,0 +1,69 @@ +#!/bin/bash + +# Look at /etc/sysconfig/proxy and make the proxy configuration +# available as environment variable in systemd services + +CFG=/etc/sysconfig/proxy +SYSTEMD_CFG=/etc/systemd/system.conf.d/proxy.conf + +test -f ${CFG} || exit 0 + +DefaultEnvironment="" + +while read line ; do + case "$line" in + \#*|"") continue ;; + esac + eval val=${line#*=} + test -z "$val" && continue + case "$line" in + PROXY_ENABLED=*) + test "$val" = "yes" && continue + if [ -f $SYSTEMD_CFG ]; then + rm $SYSTEMD_CFG + systemctl daemon-reload + fi + exit 0 + ;; + HTTP_PROXY=*) + DefaultEnvironent="$DefaultEnvironent \"HTTP_PROXY=${val}\" \"http_proxy=${val}\"" + ;; + HTTPS_PROXY=*) + DefaultEnvironent="$DefaultEnvironent \"HTTPS_PROXY=${val}\" \"https_proxy=${val}\"" + ;; + FTP_PROXY=*) + DefaultEnvironent="$DefaultEnvironent \"FTP_PROXY=${val}\" \"ftp_proxy=${val}\"" + ;; + GOPHER_PROXY=*) + DefaultEnvironent="$DefaultEnvironent \"GOPHER_PROXY=${val}\" \"gopher_proxy=${val}\"" + ;; + SOCKS_PROXY=*) + DefaultEnvironent="$DefaultEnvironent \"SOCKS_PROXY=${val}\" \"socks_proxy=${val}\"" + ;; + SOCKS5_SERVER=*) + DefaultEnvironent="$DefaultEnvironent \"SOCKS5_PROXY=${val}\" \"socks5_proxy=${val}\"" + ;; + NO_PROXY=*) + DefaultEnvironent="$DefaultEnvironent \"NO_PROXY=${val}\" \"no_proxy=${val}\"" + ;; + esac +done < $CFG + +test -z "$DefaultEnvironent" && exit 0 + +if [ ! -d /etc/systemd/system.conf.d ]; then + mkdir -p /etc/systemd/system.conf.d || exit 1 +fi + +TMPCFGFILE=`mktemp ${SYSTEMD_CFG}.XXXXXXXXXX` || exit 1 +echo -e "[Manager]\nDefaultEnvironment=${DefaultEnvironent}" > ${TMPCFGFILE} +cmp -s ${TMPCFGFILE} ${SYSTEMD_CFG} +if [ $? -ne 0 ]; then + chmod 0644 ${TMPCFGFILE} + mv ${TMPCFGFILE} ${SYSTEMD_CFG} + systemctl daemon-reload +else + rm -f $TMPCFGFIlE +fi + +exit 0