Hello community,

here is the log from the commit of package dracut-saltboot for 
openSUSE:Leap:15.2 checked in at 2020-03-15 07:13:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/dracut-saltboot (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.dracut-saltboot.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "dracut-saltboot"

Sun Mar 15 07:13:08 2020 rev:2 rq:784966 version:0.1.1580471316.1839544

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/dracut-saltboot/dracut-saltboot.changes        
2020-01-15 14:53:01.809509826 +0100
+++ 
/work/SRC/openSUSE:Leap:15.2/.dracut-saltboot.new.3160/dracut-saltboot.changes  
    2020-03-15 07:13:16.197031721 +0100
@@ -1,0 +2,14 @@
+Wed Jan 29 12:43:16 UTC 2020 - Ondrej Holecek <[email protected]>
+
+- Add support for FQDN as a terminal name
+- Update to version 0.1.1580471316.1839544
+
+-------------------------------------------------------------------
+Thu Jan  9 15:33:44 UTC 2020 - Ondrej Holecek <[email protected]>
+
+- Source wicked network information to access IPADDR and DNSDOMAIN variables
+- Replace systemException functions by log and reboot actions
+- Stop waiting for devices when dracut timeout is hit
+- Update to version 0.1.1579102150.4716559
+
+-------------------------------------------------------------------

Old:
----
  dracut-saltboot-0.1.1574263639.c30ba46.tar.xz

New:
----
  dracut-saltboot-0.1.1580471316.1839544.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ dracut-saltboot.spec ++++++
--- /var/tmp/diff_new_pack.yCWaR8/_old  2020-03-15 07:13:16.541031902 +0100
+++ /var/tmp/diff_new_pack.yCWaR8/_new  2020-03-15 07:13:16.545031904 +0100
@@ -16,7 +16,7 @@
 #
 
 Name:           dracut-saltboot
-Version:        0.1.1574263639.c30ba46
+Version:        0.1.1580471316.1839544
 Release:        0
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source:         dracut-saltboot-%{version}.tar.xz

++++++ dracut-saltboot-0.1.1574263639.c30ba46.tar.xz -> 
dracut-saltboot-0.1.1580471316.1839544.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/dracut-saltboot-0.1.1574263639.c30ba46/dracut-saltboot.changes 
new/dracut-saltboot-0.1.1580471316.1839544/dracut-saltboot.changes
--- old/dracut-saltboot-0.1.1574263639.c30ba46/dracut-saltboot.changes  
2019-11-20 16:27:19.000000000 +0100
+++ new/dracut-saltboot-0.1.1580471316.1839544/dracut-saltboot.changes  
2020-01-31 12:48:36.000000000 +0100
@@ -1,7 +1,21 @@
 -------------------------------------------------------------------
+Wed Jan 29 12:43:16 UTC 2020 - Ondrej Holecek <[email protected]>
+
+- Add support for FQDN as a terminal name
+
+-------------------------------------------------------------------
+Thu Jan  9 15:33:44 UTC 2020 - Ondrej Holecek <[email protected]>
+
+- Source wicked network information to access IPADDR and DNSDOMAIN variables
+- Replace systemException functions by log and reboot actions
+- Stop waiting for devices when dracut timeout is hit
+- Update to version 0.1.1579102150.4716559
+
+-------------------------------------------------------------------
 Wed Nov 20 14:37:09 UTC 2019 - Ondrej Holecek <[email protected]>
 
 - Include swapon in saltboot initrd
+- Update to version 0.1.1574263639.c30ba46
 
 -------------------------------------------------------------------
 Mon Aug 19 12:36:13 UTC 2019 - Vladimir Nadvornik <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/dracut-saltboot-0.1.1574263639.c30ba46/dracut-saltboot.spec 
new/dracut-saltboot-0.1.1580471316.1839544/dracut-saltboot.spec
--- old/dracut-saltboot-0.1.1574263639.c30ba46/dracut-saltboot.spec     
2019-11-20 16:27:19.000000000 +0100
+++ new/dracut-saltboot-0.1.1580471316.1839544/dracut-saltboot.spec     
2020-01-31 12:48:36.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package dracut-saltboot
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LLC.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/dracut-saltboot-0.1.1574263639.c30ba46/saltboot/saltboot-root.sh 
new/dracut-saltboot-0.1.1580471316.1839544/saltboot/saltboot-root.sh
--- old/dracut-saltboot-0.1.1574263639.c30ba46/saltboot/saltboot-root.sh        
2019-11-20 16:27:19.000000000 +0100
+++ new/dracut-saltboot-0.1.1580471316.1839544/saltboot/saltboot-root.sh        
2020-01-31 12:48:36.000000000 +0100
@@ -4,8 +4,23 @@
   root=saltboot
 else
   # we have root, we can eventually continue without network after timeout
+
+  # we however need to check if the root is valid. If we are still waiting
+  # for the device, then lets keep waiting and end in emergency shell
+
   # the timeout is controlled by rd.retry option
-  echo "rm -f -- $hookdir/initqueue/finished/wait-network.sh" > 
$hookdir/initqueue/timeout/saltboot-network.sh
+
+  local _name
+  _name="$(str_replace "${root#block:}" '/' '\x2f')"
+  cat <<EOF_TIMEOUT > "$hookdir/initqueue/timeout/saltboot-timeout.sh"
+for f in wait-network.sh "devexists-$_name.sh"; do
+  if [ ! -e "$hookdir/initqueue/finished/\$f" ] || ( . 
"$hookdir/initqueue/finished/\$f" ); then
+    rm -f -- "$hookdir/initqueue/finished/wait-network.sh"
+    rm -f -- "$hookdir/initqueue/finished/devexists-$_name.sh"
+  fi
+done
+EOF_TIMEOUT
+
 fi
 
 rootok=1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/dracut-saltboot-0.1.1574263639.c30ba46/saltboot/saltboot.sh 
new/dracut-saltboot-0.1.1580471316.1839544/saltboot/saltboot.sh
--- old/dracut-saltboot-0.1.1574263639.c30ba46/saltboot/saltboot.sh     
2019-11-20 16:27:19.000000000 +0100
+++ new/dracut-saltboot-0.1.1580471316.1839544/saltboot/saltboot.sh     
2020-01-31 12:48:36.000000000 +0100
@@ -11,6 +11,14 @@
     exit 0
 fi
 
+IFCONFIG="$(compgen -G '/tmp/leaseinfo.*.dhcp.ipv*')"
+if [ -f "$IFCONFIG" ]; then
+    . "$IFCONFIG"
+else
+    Echo "No network details available, skipping saltboot";
+    exit 0
+fi
+
 NEWROOT=${NEWROOT:-/mnt}
 export NEWROOT
 
@@ -71,37 +79,44 @@
 fi
 
 if [ -z "$HAVE_MINION_ID" ] ; then
-    SMBIOS_MANUFACTURER=`salt-call --local --out newline_values_only 
smbios.get system-manufacturer | tr -d -c 'A-Za-z0-9_-'`
-    SMBIOS_PRODUCT=`salt-call --local --out newline_values_only smbios.get 
system-product-name | tr -d -c 'A-Za-z0-9_-'`
-    SMBIOS_SERIAL=-`salt-call --local --out newline_values_only smbios.get 
system-serial-number | tr -d -c 'A-Za-z0-9_-'`
-
-    if [ "x$SMBIOS_SERIAL" == "x-None" ] ; then
-        SMBIOS_SERIAL=
+    FQDN=`dig $DIG_OPTIONS -x "${IPADDR%/*}" | sed -e 's|;;.*||' -e 's|\.$||' `
+    if [ -n "$USE_FQDN_MINION_ID" ]; then
+        HOSTNAME="$FQDN"
+    else
+        HOSTNAME=${FQDN%%.*}
     fi
 
-    FQDN=`dig $DIG_OPTIONS -x "$IPADDR" | sed -e 's|;;.*||' -e 's|\.$||' `
-    HOSTNAME=${FQDN%%.*}
-
     if [ -n "$DISABLE_UNIQUE_SUFFIX" ] ; then
         UNIQUE_SUFFIX=
     else
         UNIQUE_SUFFIX="-${MACHINE_ID:0:4}"
     fi
 
-    if [ -n "$HOSTNAME" -a -z "$DISABLE_HOSTNAME_ID" ] ; then
+    if [ -z "$HOSTNAME" ] || [ -n "$DISABLE_HOSTNAME_ID" ]; then
+        SMBIOS_MANUFACTURER=`salt-call --local --out newline_values_only 
smbios.get system-manufacturer | tr -d -c 'A-Za-z0-9_-'`
+        SMBIOS_PRODUCT=`salt-call --local --out newline_values_only smbios.get 
system-product-name | tr -d -c 'A-Za-z0-9_-'`
+        SMBIOS_SERIAL=-`salt-call --local --out newline_values_only smbios.get 
system-serial-number | tr -d -c 'A-Za-z0-9_-'`
+
+        if [ "x$SMBIOS_SERIAL" == "x-None" ] ; then
+            SMBIOS_SERIAL=
+        fi
+
         # MINION_ID_PREFIX can be specified on kernel cmdline
-        if [ -n "$MINION_ID_PREFIX" ] ; then
-            echo "$MINION_ID_PREFIX.$HOSTNAME$UNIQUE_SUFFIX" > 
/etc/salt/minion_id
+        if [ -n "$MINION_ID_PREFIX" ] && [ -z "$DISABLE_ID_PREFIX" ] ; then
+            echo 
"$MINION_ID_PREFIX.$SMBIOS_MANUFACTURER-$SMBIOS_PRODUCT$SMBIOS_SERIAL$UNIQUE_SUFFIX"
 > /etc/salt/minion_id
         else
-            echo "$FQDN$UNIQUE_SUFFIX" > /etc/salt/minion_id
+            echo 
"$SMBIOS_MANUFACTURER-$SMBIOS_PRODUCT$SMBIOS_SERIAL$UNIQUE_SUFFIX" > 
/etc/salt/minion_id
         fi
     else
-        if [ -n "$MINION_ID_PREFIX" ] ; then
-            echo 
"$MINION_ID_PREFIX.$SMBIOS_MANUFACTURER-$SMBIOS_PRODUCT$SMBIOS_SERIAL$UNIQUE_SUFFIX"
 > /etc/salt/minion_id
+
+        # MINION_ID_PREFIX can be specified on kernel cmdline
+        if [ -n "$MINION_ID_PREFIX" ] && [ -z "$DISABLE_ID_PREFIX" ] ; then
+            echo "$MINION_ID_PREFIX.$HOSTNAME$UNIQUE_SUFFIX" > 
/etc/salt/minion_id
         else
-          echo 
"$SMBIOS_MANUFACTURER-$SMBIOS_PRODUCT$SMBIOS_SERIAL$UNIQUE_SUFFIX" > 
/etc/salt/minion_id
+            echo "$HOSTNAME$UNIQUE_SUFFIX" > /etc/salt/minion_id
         fi
     fi
+
     cat > /etc/salt/minion.d/grains-minion_id_prefix.conf <<EOT
 grains:
   minion_id_prefix: $MINION_ID_PREFIX
@@ -114,16 +129,19 @@
     # either we have MASTER set on commandline
     # or we try to resolve the 'salt' alias
     if [ -z "$MASTER" ] ; then
-        MASTER=`dig $DIG_OPTIONS -t CNAME salt.$DOMAIN | sed -e 's|;;.*||' -e 
's|\.$||' `
+        MASTER=`dig $DIG_OPTIONS -t CNAME salt.$DNSDOMAIN | sed -e 's|;;.*||' 
-e 's|\.$||' `
     fi
-    # if it fails, do nothing and let it fall back to 'salt'
     if [ -n "$MASTER" ] ; then
         echo "master: $MASTER" > /etc/salt/minion.d/master.conf
     fi
     # else
     # ... if it fails, do nothing and let it fall back to 'salt'
+    # by continuing we hide dns errors. Shouldn't we require proper setup?
 fi
 
+Echo "Using Salt master: ${MASTER:-$CUR_MASTER}"
+echo "Using Salt master: ${MASTER:-$CUR_MASTER}" > /progress
+
 if [ -z "$kiwidebug" ];then
     salt-minion -d
 else
@@ -135,9 +153,10 @@
 SALT_PID=`cat /var/run/salt-minion.pid`
 
 if [ -z "$SALT_PID" ] ; then
-   systemException \
-       "SALT Minion did not start" \
-       "reboot"
+    Echo "Salt Minion did not start"
+    echo "Salt Minion did not start" > /progress
+    sleep 10
+    reboot -f
 fi
 
 MINION_ID="`salt-call --local --out newline_values_only grains.get id`"
@@ -157,10 +176,8 @@
 Echo "$MINION_FINGERPRINT"
 Echo
 
-if [ -e /progress ] ; then
-    # split line into two to fit to screen. Need tripple \ to properly pass 
through
-    echo "Terminal ID: $MINION_ID\\\nFingerprint: $MINION_FINGERPRINT" > 
/progress
-fi
+# split line into two to fit to screen. Need triple \ to properly pass through
+echo "Terminal ID: $MINION_ID\\\nFingerprint: $MINION_FINGERPRINT" > /progress
 
 SALT_TIMEOUT=${SALT_TIMEOUT:-60}
 num=0
@@ -173,6 +190,8 @@
     export systemIntegrity=fine
     export imageName=`cat $NEWROOT/etc/ImageVersion`
     echo "SUSE Manager server does not respond, trying local boot 
to\\\n$imageName" > /progress
+    Echo "SUSE Manager server does not respond, trying local boot 
to\\\n$imageName"
+    sleep 5
     kill "$SALT_PID"
     sleep 1
   fi
@@ -185,9 +204,9 @@
 [ -n "$PROGRESS_PID" ] && kill $PROGRESS_PID
 
 if [ "$systemIntegrity" = "unknown" ] ; then
-   systemException \
-       "SALT Minion did not create valid configuration" \
-       "reboot"
+    Echo "SALT Minion did not create valid configuration"
+    sleep 10
+    reboot -f
 fi
 
 cat > /etc/salt/minion.d/grains-initrd.conf <<EOT


Reply via email to