Skip to contentSkip to conversation

4.5 patch: xendomains noise to stderr in rdname()

DISCUSSION Mark Pryor 2 participants 3 messages Dec 13, 2014

lore
Share & tools
lore

Mark Pryor

author
#0 lore raw

Instead of tracking down which commit involving libxl* which prints all kind of noiseto stderr, I will post a workaround.

If you build, install, and use 4.5 this bug will drive you mad, so here it is:
-------------------- snip -----------------
--- a/tools/hotplug/Linux/xendomains.in+++ b/tools/hotplug/Linux/xendomains.in @@ -175,7 +175,7 @@ contains_something()

 # read name from xen config file
 rdname()
 {
-    NM=$($CMD create --quiet --dryrun --defconfig "$1" |
+    NM=$($CMD create --quiet --dryrun --defconfig "$1" 2>&1 |
          sed -n 's/^.*(name \(.*\))$/\1/p;s/^.*"name": "\(.*\)",$/\1/p')
 }

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

#1 lore raw
Quoted 1 line · Mark Pryor

Instead of tracking down which commit involving libxl* which prints all kind of noiseto stderr, I will post a workaround.

Though I think I am able to guess what log you were seeing, it would be better in the future if you attach actual log for a bug report.

I will post a patch for this.

Wei.

Quoted 19 lines

If you build, install, and use 4.5 this bug will drive you mad, so here it is:
-------------------- snip -----------------
--- a/tools/hotplug/Linux/xendomains.in+++ b/tools/hotplug/Linux/xendomains.in

(quoted diff) +1 -1
@@ -175,7 +175,7 @@ contains_something()
  # read name from xen config file
  rdname()
  {
-    NM=$($CMD create --quiet --dryrun --defconfig "$1" |
+    NM=$($CMD create --quiet --dryrun --defconfig "$1" 2>&1 |
           sed -n 's/^.*(name \(.*\))$/\1/p;s/^.*"name": "\(.*\)",$/\1/p')
  }
 

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

author
#2 lore raw

I think I tracked it down this morning:
this commit d36a373 fix xl: migration causes $(which xendomains) start to flood logs with JSON configs
IOW, when the xendomains services starts, the JSON config for every domU in autostart folder is logged. Its written to stdout if you do manually:$(which xendomains) start

I am using the above patch to rdname() in all my dom0 builds with 4.5 (HEAD) to avoid this trouble.

     On Saturday, December 13, 2014 8:45 AM, Wei Liu <[email protected]> wrote:
Quoted 1 line · Mark Pryor

Instead of tracking down which commit involving libxl* which prints all kind of noiseto stderr, I will post a workaround.

Though I think I am able to guess what log you were seeing, it would be better in the future if you attach actual log for a bug report.

I will post a patch for this.

Wei.

Quoted 15 lines

If you build, install, and use 4.5 this bug will drive you mad, so here it is:
-------------------- snip -----------------
--- a/tools/hotplug/Linux/xendomains.in+++ b/tools/hotplug/Linux/xendomains.in

(quoted diff) +1 -1
@@ -175,7 +175,7 @@ contains_something()
  # read name from xen config file
  rdname()
  {
-    NM=$($CMD create --quiet --dryrun --defconfig "$1" |
+    NM=$($CMD create --quiet --dryrun --defconfig "$1" 2>&1 |
           sed -n 's/^.*(name \(.*\))$/\1/p;s/^.*"name": "\(.*\)",$/\1/p')
  }
 
Quoted 4 lines

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

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