Skip to contentSkip to conversation

Various fixes when using standalone

PATCH New Konrad Rzeszutek Wilk 2 participants 12 messages Oct 26, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Various fixes when using standalone

Hey,

Some more fixes that the OSSTest may want when folks are using the standalone state.

 Osstest/DhcpWatch/leases.pm | 2 +-
 README                      | 3 ++-
 standalone-reset            | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

Konrad Rzeszutek Wilk (3):
DhcpWatch: Print what is wrong with the line.
standalong-reset: Use the $suite when recreating soft links.
README: Mention the / requirement in Tftp[Dir|Tmp]Dir

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#1 lore raw

PATCH 1/3 DhcpWatch: Print what is wrong with the line.

If the user forgot to include 'dhcp3' on the parameter line point out the error to the user.

---
 Osstest/DhcpWatch/leases.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Osstest/DhcpWatch/leases.pm +1 -1
index b74ebf0..13ab7b4 100644
@@ -40,7 +40,7 @@ BEGIN {
 
 sub new {
     my ($class, $ho, $meth, $format, $source) = @_;
-    die "$format (@_) ?" unless $format eq 'dhcp3';
+    die "'$format' is missing dhcp3 in it!" unless $format eq 'dhcp3';
     return bless {
 	Format => $format,
 	Source => $source,
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#2 lore raw

Re: [PATCH 1/3] DhcpWatch: Print what is wrong with the line.

Konrad Rzeszutek Wilk writes ("[PATCH 1/3] DhcpWatch: Print what is wrong with the line."):

Quoted 2 lines

If the user forgot to include 'dhcp3' on the parameter line point out the error to the user.

How about this ?

From 693471df9e9a2a491a576ae644d02751906a63cf Mon Sep 17 00:00:00 2001
From: Konrad Rzeszutek Wilk <[email protected]>
Date: Wed, 26 Oct 2016 14:14:07 -0400
Subject: [OSSTEST PATCH] DhcpWatch: Print what is wrong with the line.

If the user forgot to include 'dhcp3' on the parameter line point out the error to the user.

---
v2: Still print out the arguments to the constructor, hopefully
non-confusingly.

---
 Osstest/DhcpWatch/leases.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Osstest/DhcpWatch/leases.pm +2 -1
index b74ebf0..98c22b9 100644
@@ -40,7 +40,8 @@ BEGIN {
 
 sub new {
     my ($class, $ho, $meth, $format, $source) = @_;
-    die "$format (@_) ?" unless $format eq 'dhcp3';
+    die "'$format' is missing dhcp3 in it! (args: @_) ?"
+	unless $format eq 'dhcp3';
     return bless {
 	Format => $format,
 	Source => $source,
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#3 lore raw

Re: [PATCH 1/3] DhcpWatch: Print what is wrong with the line.

Quoted 5 lines · Ian Jackson

Konrad Rzeszutek Wilk writes ("[PATCH 1/3] DhcpWatch: Print what is wrong with the line."):

Quoted 2 lines

If the user forgot to include 'dhcp3' on the parameter line point out the error to the user.

How about this ?

+1

Quoted 35 lines
Quoted 2 lines

From 693471df9e9a2a491a576ae644d02751906a63cf Mon Sep 17 00:00:00 2001

From: Konrad Rzeszutek Wilk <[email protected]>
Date: Wed, 26 Oct 2016 14:14:07 -0400
Subject: [OSSTEST PATCH] DhcpWatch: Print what is wrong with the line.

If the user forgot to include 'dhcp3' on the parameter line point out the error to the user.

---
v2: Still print out the arguments to the constructor, hopefully
non-confusingly.

---
 Osstest/DhcpWatch/leases.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Osstest/DhcpWatch/leases.pm +2 -1
index b74ebf0..98c22b9 100644
@@ -40,7 +40,8 @@ BEGIN {
 
 sub new {
     my ($class, $ho, $meth, $format, $source) = @_;
-    die "$format (@_) ?" unless $format eq 'dhcp3';
+    die "'$format' is missing dhcp3 in it! (args: @_) ?"
+	unless $format eq 'dhcp3';
     return bless {
 	Format => $format,
 	Source => $source,
Signature · 1 line
2.1.4

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#4 lore raw

PATCH 2/3 standalong-reset: Use the $suite when recreating soft links.

In reply to Konrad Rzeszutek Wilk

Commit ef3a6f2162ced5cfeb08b437315b69ad1ddbc5ed:
"Add -$suite suffix to TftpDiVersion in code" forgot to include the $suite parameter when re-linking current-$suite against the <date>-$suite.

Specifically after we have downloaded the debian files the $TftpDir has:

konrad konrad 4096 paź 26 13:29 2016-10-26-jessi
konrad konrad 17 paź 26 13:29 current-jessie -> 2016-10-26-jessi

we end up removing the symlink (current-jessie) and then recreating it as:

konrad konrad 4096 paź 26 13:29 2016-10-26-jessi
konrad konrad 10 paź 26 13:29 current-jessie -> 2016-10-2

which is wrong as there is no '2016-10-2' directory.

The patch is to add the $suite in the linking.

---
CC: Marcos Matsunaga <[email protected]>

---
 standalone-reset | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
standalone-reset +1 -1
index 7f34b61..c587e60 100755
@@ -119,7 +119,7 @@ else
 			div="${div#* }"
 			if [ -n "$div" ] ; then
 			    rm -f "$tftp/$dibase/$arch/current-$suite"
-			    ln -s $div "$tftp/$dibase/$arch/current-$suite"
+			    ln -s $div-$suite "$tftp/$dibase/$arch/current-$suite"
 			fi
 		done
 	fi
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#5 lore raw

PATCH 3/3 README: Mention the / requirement in Tftp[Dir|Tmp]Dir

In reply to Konrad Rzeszutek Wilk

That is the / should be part of the directory name. Otherwise we get strange files such as: pxelinux.cfgC0A86A3C in the TftpPath directory.

---
 README | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
README +2 -1
index 167c1bd..512f64b 100644
@@ -497,9 +497,10 @@ Tftp*
     TftpPath          The path to the root of the directory which is exposed by
                       the tftpserver (e.g. /tftpboot).
     TftpTmpDir        A directory under `Path' to use for temporary files.
+                      Make sure you have the / postfix included (e.g. tmp/)
 
     TftpPxeDir        The path under `Path' to the PXE configuration directory
-                      (e.g. pxelinux.cfg)
+                      (e.g. pxelinux.cfg/) Make sure you have the / included.
     TftpPxeGroup      The Unix group which should own files under `PxeDir'.
     TftpPxeTemplates  See TftpPxeTemplates
     TftpPxeTemplatesReal
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#6 lore raw

Re: [PATCH 3/3] README: Mention the / requirement in Tftp[Dir|Tmp]Dir

Konrad Rzeszutek Wilk writes ("[PATCH 3/3] README: Mention the / requirement in Tftp[Dir|Tmp]Dir"):

Quoted 3 lines

That is the / should be part of the directory name. Otherwise we get strange files such as: pxelinux.cfgC0A86A3C in the TftpPath directory.

I've edited this slightly.

Ian.

From 9f0b83ebefc90c46fafd8efdba2b258926d18be0 Mon Sep 17 00:00:00 2001
From: Konrad Rzeszutek Wilk <[email protected]>
Date: Wed, 26 Oct 2016 14:14:09 -0400
Subject: [OSSTEST PATCH] README: Mention the / requirement in Tftp[Dir|Tmp]Dir

That is the / should be part of the directory name. Otherwise we get strange files such as: pxelinux.cfgC0A86A3C in the TftpPath directory.

---
v2: Slightly improved wording.

---
 README | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
README +2 -1
index 167c1bd..e3519a4 100644
@@ -497,9 +497,10 @@ Tftp*
     TftpPath          The path to the root of the directory which is exposed by
                       the tftpserver (e.g. /tftpboot).
     TftpTmpDir        A directory under `Path' to use for temporary files.
+                      Make sure you include the trailing / (e.g. tmp/)
 
     TftpPxeDir        The path under `Path' to the PXE configuration directory
-                      (e.g. pxelinux.cfg)
+                      (e.g. pxelinux.cfg/).   Include the trailing /.
     TftpPxeGroup      The Unix group which should own files under `PxeDir'.
     TftpPxeTemplates  See TftpPxeTemplates
     TftpPxeTemplatesReal
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#7 lore raw

Re: [PATCH 3/3] README: Mention the / requirement in Tftp[Dir|Tmp]Dir

Quoted 5 lines · Ian Jackson

Konrad Rzeszutek Wilk writes ("[PATCH 3/3] README: Mention the / requirement in Tftp[Dir|Tmp]Dir"):

Quoted 3 lines

That is the / should be part of the directory name. Otherwise we get strange files such as: pxelinux.cfgC0A86A3C in the TftpPath directory.

Quoted 8 lines

I've edited this slightly.

Ian.

Quoted 1 line

From 9f0b83ebefc90c46fafd8efdba2b258926d18be0 Mon Sep 17 00:00:00 2001

From: Konrad Rzeszutek Wilk <[email protected]>
Date: Wed, 26 Oct 2016 14:14:09 -0400
Subject: [OSSTEST PATCH] README: Mention the / requirement in Tftp[Dir|Tmp]Dir

                                                                     ^^^ - > Pxe

Ooops:

s/[Dir/[Pxe/

+1!

Quoted 32 lines

That is the / should be part of the directory name. Otherwise we get strange files such as: pxelinux.cfgC0A86A3C in the TftpPath directory.

---
v2: Slightly improved wording.

---
 README | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
README +2 -1
index 167c1bd..e3519a4 100644
@@ -497,9 +497,10 @@ Tftp*
     TftpPath          The path to the root of the directory which is exposed by
                       the tftpserver (e.g. /tftpboot).
     TftpTmpDir        A directory under `Path' to use for temporary files.
+                      Make sure you include the trailing / (e.g. tmp/)
 
     TftpPxeDir        The path under `Path' to the PXE configuration directory
-                      (e.g. pxelinux.cfg)
+                      (e.g. pxelinux.cfg/).   Include the trailing /.
     TftpPxeGroup      The Unix group which should own files under `PxeDir'.
     TftpPxeTemplates  See TftpPxeTemplates
     TftpPxeTemplatesReal
Signature · 1 line
2.1.4

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#8 lore raw

Re: [PATCH 3/3] README: Mention the / requirement in Tftp[Dir|Tmp]Dir

Konrad Rzeszutek Wilk writes ("Re: [PATCH 3/3] README: Mention the / requirement in Tftp[Dir|Tmp]Dir"):

Quoted 5 lines · Ian Jackson
Quoted 1 line

Subject: [OSSTEST PATCH] README: Mention the / requirement in Tftp[Dir|Tmp]Dir

                                                                     ^^^ - > Pxe

Ooops:

Fixed, ta.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#9 lore raw

PATCH 1/1 standalone-reset: Check for TftpPxeDir

In reply to Konrad Rzeszutek Wilk

While patch: "README: Mention the / requirement in Tftp[Dir|Tmp]Dir" we should also double-check that the directory actually exists.

---
 standalone-reset | 3 +++
 1 file changed, 3 insertions(+)
standalone-reset +3 -0
index c587e60..69a3226 100755
@@ -101,6 +101,9 @@ else
 	tftptmp=`getconfig TftpTmpDir`
 	ensure_dir "$tftp$tftptmp"
 
+	tftpconfig=`getconfig TftpPxeDir`
+	ensure_dir "$tftp$tftpconfig"
+
 	dibase=`getconfig TftpDiBase`
 	suite=`getconfig DebianSuite`
 	diver=`getconfig_TftpDiVersion_suite $suite`
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Acked-by on v1 1/1
#10 lore raw

Re: [PATCH] standalone-reset: Check for TftpPxeDir

Konrad Rzeszutek Wilk writes ("[PATCH] standalone-reset: Check for TftpPxeDir"):

Quoted 4 lines

While patch: "README: Mention the / requirement in Tftp[Dir|Tmp]Dir" we should also double-check that the directory actually exists.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#11 lore raw

Re: [PATCH] standalone-reset: Check for TftpPxeDir

Quoted 2 lines · Ian Jackson

Konrad Rzeszutek Wilk writes ("[PATCH] standalone-reset: Check for TftpPxeDir"):

Quoted 1 line

While patch: "README: Mention the / requirement in Tftp[Dir|Tmp]Dir"

Garh

s/[Dir/[Pxe

now that you fixed that up.

Sorry for that!

Quoted 5 lines
Quoted 3 lines

we should also double-check that the directory actually exists.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel