Fix RegEx Issues with xendomains for both SXP and JSON outputs of lx list -l
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
RFC PATCH 1/1 Fix RegEx Issues with xendomains for both SXP and JSON outputs of lx list -l
(Resent, as Yahoo seems to silently drop sentemail with the subject starting with a square open bracket. Space inserted - apologies if received more than once)
Modifications to xendomains so that it correctly identifies a new domain entry when parsing the output of xl list -l. For both SXP and JSON outputs, it was failing to spot a new domain entry and was saving the second domain under a filename generated from the first domain's name.
I have listed this as RFC because although it is a patch against 4.3RC5, I have not had a chance to test against RC5, only 4.2.2. I won't get an opportunity until the weekend, so I invite comment and anybody to give it a test against RC5. Ian C has already commented elsewhere that the xl list -l JSON output has been altered between 4.2.x and 4.3RC5, so this might affect the indentation (the 4 spaces in the middle of the LIST_GREP variable) - the trigger for new domain data is ' {' in JSON version (in at least 4.2.2) and '(domain' in SXP version. Not tested against xm.
It seems there is a problem in 4.2.2's implementation of SXP output of xl list -l in that all domain ID's are outputted as -1. Ian C suggested applying a change that originally went into 4.3 to resolve this issue. This seemed to do the trick (see thread [Xen-users] DomU suspension/hibernation )
Thanks to David Sutton for tracking through the issues with me and Ian C for guidance and assistance.
(quoted diff) +0 -0
b/tools/hotplug/Linux/init.d/xendomains
index 730541e..38371af 100644
tools/hotplug/Linux/init.d/xendomains +0 -0
@@ -206,7 +206,7 @@ rdnames()
done
}
-LIST_GREP='((domain\|(domid\|(name\|^{$\|"name":\|"domid":' +LIST_GREP='(domain\|(domid\|(name\|^ {$\|"name":\|"domid":' parseln()
{
if [[ "$1" =~ '(domain' ]] || [[ "$1" = "{" ]]; then @@ -237,7 +237,7 @@ is_running()
RC=0
;;
esac
- done < <($CMD list -l | grep $LIST_GREP)
+ done < <($CMD list -l | grep "$LIST_GREP") return $RC
}
@@ -319,7 +319,7 @@ all_zombies()
if test "$state" != "-b---d" -a "$state" != "-----d"; then return 1;
fi
- done < <($CMD list -l | grep $LIST_GREP)
+ done < <($CMD list -l | grep "$LIST_GREP")
return 0
}
@@ -450,7 +450,7 @@ stop()
fi
kill $WDOG_PID >/dev/null 2>&1
fi
- done < <($CMD list -l | grep $LIST_GREP)
+ done < <($CMD list -l | grep "$LIST_GREP")
# NB. this shuts down ALL Xen domains (politely), not just the ones in # AUTODIR/*
@@ -487,7 +487,7 @@ check_domain_up()
return 0
;;
esac
- done < <($CMD list -l | grep $LIST_GREP)
+ done < <($CMD list -l | grep "$LIST_GREP")
return 1
}
PATCH - RFC Fix RegEx Issues with xendomains for both SXP and JSON outputs of lx list -l
(Resent several times, as Yahoo seems to be silently dropping some emails with square brackets in the subject for rme - apologies if received more than once)
Modifications to xendomains so that it correctly identifies a new domain entry when parsing the output of xl list -l. For both SXP and JSON outputs, it was failing to spot a new domain entry and was saving the second domain under a filename generated from the first domain's name.
I have listed this as RFC because although it is a patch against 4.3RC5, I have not had a chance to test against RC5, only 4.2.2. I won't get an opportunity until the weekend, so I invite comment and anybody to give it a test against RC5. Ian C has already commented elsewhere that the xl list -l JSON output has been altered between 4.2.x and 4.3RC5, so this might affect the indentation (the 4 spaces in the middle of the LIST_GREP variable) - the trigger for new domain data is ' {' in JSON version (in at least 4.2.2) and '(domain' in SXP version. Not tested against xm.
It seems there is a problem in 4.2.2's implementation of SXP output of xl list -l in that all domain ID's are outputted as -1. Ian C suggested applying a change that originally went into 4.3 to resolve this issue. This seemed to do the trick (see thread [Xen-users] DomU suspension/hibernation )
Thanks to David Sutton for tracking through the issues with me and Ian C for guidance and assistance.
(quoted diff) +0 -0
b/tools/hotplug/Linux/init.d/xendomains
index 730541e..38371af 100644
tools/hotplug/Linux/init.d/xendomains +0 -0
@@ -206,7 +206,7 @@ rdnames()
done
}
-LIST_GREP='((domain\|(domid\|(name\|^{$\|"name":\|"domid":' +LIST_GREP='(domain\|(domid\|(name\|^ {$\|"name":\|"domid":' parseln()
{
if [[ "$1" =~ '(domain' ]] || [[ "$1" = "{" ]]; then @@ -237,7 +237,7 @@ is_running()
RC=0
;;
esac
- done < <($CMD list -l | grep $LIST_GREP)
+ done < <($CMD list -l | grep "$LIST_GREP") return $RC
}
@@ -319,7 +319,7 @@ all_zombies()
if test "$state" != "-b---d" -a "$state" != "-----d"; then return 1;
fi
- done < <($CMD list -l | grep $LIST_GREP)
+ done < <($CMD list -l | grep "$LIST_GREP")
return 0
}
@@ -450,7 +450,7 @@ stop()
fi
kill $WDOG_PID >/dev/null 2>&1
fi
- done < <($CMD list -l | grep $LIST_GREP)
+ done < <($CMD list -l | grep "$LIST_GREP")
# NB. this shuts down ALL Xen domains (politely), not just the ones in # AUTODIR/*
@@ -487,7 +487,7 @@ check_domain_up()
return 0
;;
esac
- done < <($CMD list -l | grep $LIST_GREP)
+ done < <($CMD list -l | grep "$LIST_GREP")
return 1
}
Quoted 3 lines · Ian Murray
(Resent, as Yahoo seems to silently drop sentemail with the subject starting with a square open bracket. Space inserted - apologies if received more than once)
How very unhelpful of them! FWIW This seems to be the first one which made it into the list archives as well as my INBOX.
I'm working through my post-vacation backlog this morning but I hope to have a chance to look at this vs. 4.3-rc soon since I think it is a worthwhile bugfix for 4.3. George, what does your release manager's hat think?
Quoted 15 lines
Modifications to xendomains so that it correctly identifies a new domain entry when parsing the output of xl list -l. For both SXP and JSON outputs, it was failing to spot a new domain entry and was saving the second domain under a filename generated from the first domain's name.
I have listed this as RFC because although it is a patch against 4.3RC5, I have not had a chance to test against RC5, only 4.2.2. I won't get an opportunity until the weekend, so I invite comment and anybody to give it a test against RC5. Ian C has already commented elsewhere that the xl list -l JSON output has been altered between 4.2.x and 4.3RC5, so this might affect the indentation (the 4 spaces in the middle of the
LIST_GREPvariable) - the trigger for new domain data is ' {' in JSON
version (in at least 4.2.2) and '(domain' in SXP version. Not tested against xm.
Quoted 5 lines
It seems there is a problem in 4.2.2's implementation of SXP output of xl list -l in that all domain ID's are outputted as -1. Ian C suggested applying a change that originally went into 4.3 to resolve this issue. This seemed to do the trick (see thread [Xen-users] DomU suspension/hibernation )
Would you be able to submit that backport as a patch against the 4.2 staging branch and CC myself and Ian Jackson <[email protected]> ?
This isn't a straight forward backport, since the majority of the commit is not a suitable candidate, but if you reference in the commit message the original commit id/subject and point out that only the one hunk is a useful bug fix which is why it's been split out then I think it would be fine to have in the next 4.2 release.
Thanks,
Ian.
Quoted 57 lines
Thanks to David Sutton for tracking through the issues with me and Ian C for guidance and assistance.
Signed-off-by Ian Murray <[email protected]>tools/hotplug/Linux/init.d/xendomains +5
-5@@ -206,7 +206,7 @@ rdnames() done } -LIST_GREP='((domain\|(domid\|(name\|^{$\|"name":\|"domid":' +LIST_GREP='(domain\|(domid\|(name\|^ {$\|"name":\|"domid":' parseln() { if [[ "$1" =~ '(domain' ]] || [[ "$1" = "{" ]]; then@@ -237,7 +237,7 @@ is_running() RC=0 ;; esac - done < <($CMD list -l | grep $LIST_GREP) + done < <($CMD list -l | grep "$LIST_GREP") return $RC }@@ -319,7 +319,7 @@ all_zombies() if test "$state" != "-b---d" -a "$state" != "-----d"; then return 1; fi - done < <($CMD list -l | grep $LIST_GREP) + done < <($CMD list -l | grep "$LIST_GREP") return 0 }@@ -450,7 +450,7 @@ stop() fi kill $WDOG_PID >/dev/null 2>&1 fi - done < <($CMD list -l | grep $LIST_GREP) + done < <($CMD list -l | grep "$LIST_GREP") # NB. this shuts down ALL Xen domains (politely), not just the ones in # AUTODIR/*@@ -487,7 +487,7 @@ check_domain_up() return 0 ;; esac - done < <($CMD list -l | grep $LIST_GREP) + done < <($CMD list -l | grep "$LIST_GREP") return 1 }
George Dunlap
Acked-byQuoted 5 lines · Ian Campbell
Quoted 3 lines · Ian Murray
(Resent, as Yahoo seems to silently drop sentemail with the subject starting with a square open bracket. Space inserted - apologies if received more than once)
Quoted 7 lines
How very unhelpful of them! FWIW This seems to be the first one which made it into the list archives as well as my INBOX.
I'm working through my post-vacation backlog this morning but I hope to have a chance to look at this vs. 4.3-rc soon since I think it is a worthwhile bugfix for 4.3. George, what does your release manager's hat think?
Well it sounded from the description like xendomains for xl is just broken, right? You can't really make it any more broken, and this patch doesn't cover any other codepaths, so there's basically zero risk of impact on other, working functionality.
So yes, I think it's good for 4.3:
----- Original Message -----
Quoted 5 lines
From: Ian Campbell <[email protected]>
To: Ian Murray <[email protected]>
Cc: "[email protected]" <[email protected]>; David Sutton <[email protected]>; Joshua Tuttle <[email protected]>; George Dunlap <[email protected]>; Ian Jackson <[email protected]>
Sent: Tuesday, 25 June 2013, 10:40
Subject: Re: [PATCH] [RFC] Fix RegEx Issues with xendomains for both SXP and
JSON outputs of lx list -l
Quoted 6 lines · Ian Murray
Quoted 3 lines
(Resent, as Yahoo seems to silently drop sentemail with the subject starting with a square open bracket. Space inserted - apologies if received more than once)
Quoted 7 lines
How very unhelpful of them! FWIW This seems to be the first one which made it into the list archives as well as my INBOX.
I'm working through my post-vacation backlog this morning but I hope to have a chance to look at this vs. 4.3-rc soon since I think it is a worthwhile bugfix for 4.3. George, what does your release manager's hat think?
There are white space issues with this patch on this thread as it is, so I re-issued it more recently directly from git, as is the preferred method I think.
As was suggested by David Sutton, there are probably more issues with this script than has been covered so far, but this change makes suspension and restoration work for me, at least. He suggests there are problems with zombies, etc.
Quoted 28 lines
Quoted 6 lines
Modifications to xendomains so that it correctly identifies a new domain entry when parsing the output of xl list -l. For both SXP and JSON outputs, it was failing to spot a new domain entry and was saving the second domain under a filename generated from the first domain's name.
Quoted 7 lines
I have listed this as RFC because although it is a patch against 4.3RC5, I have not had a chance to test against RC5, only 4.2.2. I won't get an opportunity until the weekend, so I invite comment and anybody to give it a test against RC5. Ian C has already commented elsewhere that the xl list -l JSON output has been altered between 4.2.x and 4.3RC5, so this might affect the indentation (the 4 spaces in the middle of the
LIST_GREPvariable) - the trigger for new domain data is ' {' inJSON
Quoted 1 line
version (in at least 4.2.2) and '(domain' in SXP version. Not
tested
Quoted 7 lines
against xm.
It seems there is a problem in 4.2.2's implementation of SXP output of xl list -l in that all domain ID's are outputted as -1. Ian C suggested applying a change that originally went into 4.3 to resolve this issue. This seemed to do the trick (see thread [Xen-users] DomU suspension/hibernation )
Would you be able to submit that backport as a patch against the 4.2 staging branch and CC myself and Ian Jackson <[email protected]> ?
Quoted 5 lines
This isn't a straight forward backport, since the majority of the commit is not a suitable candidate, but if you reference in the commit message the original commit id/subject and point out that only the one hunk is a useful bug fix which is why it's been split out then I think it would be fine to have in the next 4.2 release.
I'll give this a go, but it will be a learning experience. I don't recall seeing any backporting info in the patch submission notes but I will take another look. Who signs a (partial) backport off? Can't be me, because I didn't write it. Or can it? or is it copied from the original submission?
Quoted 67 lines
Thanks,
Ian.Quoted 8 lines
Thanks to David Sutton for tracking through the issues with me and Ian C for guidance and assistance.
Signed-off-by Ian Murray <[email protected]>Quoted 10 lines
diff --git a/tools/hotplug/Linux/init.d/xendomains b/tools/hotplug/Linux/init.d/xendomains index 730541e..38371af 100644
--- a/tools/hotplug/Linux/init.d/xendomains +++ b/tools/hotplug/Linux/init.d/xendomains @@ -206,7 +206,7 @@rdnames()
done
}-LIST_GREP='((domain\|(domid\|(name\|^{$\|"name":\|"domid":'
Quoted 1 line
+LIST_GREP='(domain\|(domid\|(name\|^
{$\|"name":\|"domid":'
Quoted 3 lines
parseln()
{
if [[ "$1" =~ '(domain' ]] || [[ "$1" ="{" ]]; then
Quoted 11 lines
@@ -237,7 +237,7 @@
is_running()
RC=0
;;
esac
- done < <($CMD list -l | grep $LIST_GREP)
+ done < <($CMD list -l | grep "$LIST_GREP")
return $RC
}@@ -319,7 +319,7 @@
all_zombies()
if test "$state" != "-b---d" -a"$state" != "-----d"; then
Quoted 7 lines
return 1;
fi
- done < <($CMD list -l | grep $LIST_GREP)
+ done < <($CMD list -l | grep "$LIST_GREP")
return 0
}Quoted 8 lines
@@ -450,7 +450,7 @@
stop()
fi
kill $WDOG_PID >/dev/null 2>&1
fi
- done < <($CMD list -l | grep $LIST_GREP)
+ done < <($CMD list -l | grep "$LIST_GREP")# NB. this shuts down ALL Xen domains (politely), not just the ones
in
Quoted 9 lines
# AUTODIR/*
@@ -487,7 +487,7 @@check_domain_up()
return 0
;;
esac
- done < <($CMD list -l | grep $LIST_GREP)
+ done < <($CMD list -l | grep "$LIST_GREP")
return 1
}
Quoted 19 lines · Ian Murray
----- Original Message -----
Quoted 5 lines
From: Ian Campbell <[email protected]>
To: Ian Murray <[email protected]>
Cc: "[email protected]" <[email protected]>; David Sutton <[email protected]>; Joshua Tuttle <[email protected]>; George Dunlap <[email protected]>; Ian Jackson <[email protected]>
Sent: Tuesday, 25 June 2013, 10:40
Subject: Re: [PATCH] [RFC] Fix RegEx Issues with xendomains for both SXP andJSON outputs of lx list -l
Quoted 9 lines · Ian Murray
Quoted 3 lines
(Resent, as Yahoo seems to silently drop sentemail with the subject starting with a square open bracket. Space inserted - apologies if received more than once)
How very unhelpful of them! FWIW This seems to be the first one which made it into the list archives as well as my INBOX.
Quoted 8 lines
Quoted 4 lines
I'm working through my post-vacation backlog this morning but I hope to have a chance to look at this vs. 4.3-rc soon since I think it is a worthwhile bugfix for 4.3. George, what does your release manager's hat think?
There are white space issues with this patch on this thread as it is, so I re-issued it more recently directly from git, as is the preferred method I think.
It's certainly less error prone. Do you have the message-id handy so I can find the right version?
Quoted 4 lines
As was suggested by David Sutton, there are probably more issues with this script than has been covered so far, but this change makes suspension and restoration work for me, at least. He suggests there are problems with zombies, etc.
You mean the handling of zombies by this script, rather than it somehow causing zombies?
Zombie domains are already themselves a bug in and of themselves so if that can be reproduced we'd like to hear about it, as for the script's handling of those zombies if/when they occur, I think it's probably something to deal with in 4.4.
Quoted 33 lines
Quoted 27 lines
Quoted 5 lines
Modifications to xendomains so that it correctly identifies a new domain entry when parsing the output of xl list -l. For both SXP and JSON outputs, it was failing to spot a new domain entry and was saving the second domain under a filename generated from the first domain's name.
Quoted 7 lines
I have listed this as RFC because although it is a patch against 4.3RC5, I have not had a chance to test against RC5, only 4.2.2. I won't get an opportunity until the weekend, so I invite comment and anybody to give it a test against RC5. Ian C has already commented elsewhere that the xl list -l JSON output has been altered between 4.2.x and 4.3RC5, so this might affect the indentation (the 4 spaces in the middle of the
LIST_GREPvariable) - the trigger for new domain data is ' {' inJSON
Quoted 1 line
version (in at least 4.2.2) and '(domain' in SXP version. Not
tested
Quoted 7 lines
against xm.
It seems there is a problem in 4.2.2's implementation of SXP output of xl list -l in that all domain ID's are outputted as -1. Ian C suggested applying a change that originally went into 4.3 to resolve this issue. This seemed to do the trick (see thread [Xen-users] DomU suspension/hibernation )
Would you be able to submit that backport as a patch against the 4.2 staging branch and CC myself and Ian Jackson <[email protected]> ?
Quoted 5 lines
This isn't a straight forward backport, since the majority of the commit is not a suitable candidate, but if you reference in the commit message the original commit id/subject and point out that only the one hunk is a useful bug fix which is why it's been split out then I think it would be fine to have in the next 4.2 release.
Quoted 3 lines
I'll give this a go, but it will be a learning experience. I don't recall seeing any backporting info in the patch submission notes but I will take another look.
Thanks. It's not that common to have to do things this way (mostly we take the entire patch) so there isn't much in the way of docs. If you just treat it for the most part like a regular submission and explain what is going on in the commit message with references to the original commit ID and title then you won't go far wrong.
Quoted 2 lines
Who signs a (partial) backport off? Can't be me, because I didn't
write it. Or can it? or is it copied from the original submission?
I think it would be appropriate to retain the original signed-off-by(s) and acks etc and append your own. Some people like to do:
Commit message
Acked-by:
Backported to X.Y
Or something like that, which is fine IMHO. Or if your commit message makes it clear enough what is going on then just tacking your S-o-b onto the original blocks of S-o-b's would be fine.
Ian J, does that sound about right? The issue is that one hunk of a73a7a0c647a "xl: Remove global domid and enable -Wshadow" is actually a useful fix but the commit as a whole is large and unsuitable for backporting IMHO.
Ian.
----- Original Message -----
Quoted 5 lines
From: Ian Campbell <[email protected]>
To: Ian Murray <[email protected]>
Cc: George Dunlap <[email protected]>; Joshua Tuttle <[email protected]>; Ian Jackson <[email protected]>; David Sutton <[email protected]>; "[email protected]" <[email protected]>
Sent: Tuesday, 25 June 2013, 14:44
Subject: Re: [Xen-devel] [PATCH] [RFC] Fix RegEx Issues with xendomains for
both SXP and JSON outputs of lx list -l
Quoted 33 lines · Ian Murray
Quoted 7 lines
----- Original Message -----
Quoted 3 lines
From: Ian Campbell <[email protected]>
To: Ian Murray <[email protected]>
Cc: "[email protected]"<[email protected]>; David Sutton <[email protected]>; Joshua Tuttle <[email protected]>; George Dunlap <[email protected]>; Ian Jackson <[email protected]>
Quoted 2 lines
Quoted 2 lines
Sent: Tuesday, 25 June 2013, 10:40
Subject: Re: [PATCH] [RFC] Fix RegEx Issues with xendomains for bothSXP and
Quoted 4 lines
JSON outputs of lx list -l
Quoted 3 lines · Ian Murray
Quoted 1 line
(Resent, as Yahoo seems to silently drop sentemail with the
subject
Quoted 1 line
Quoted 1 line
Quoted 1 line
starting with a square open bracket. Space inserted - apologies
if
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
received more than once)
How very unhelpful of them! FWIW This seems to be the first one which made it into the list archives as well as my INBOX.
I'm working through my post-vacation backlog this morning but I
hope to
Quoted 2 lines
Quoted 2 lines
have a chance to look at this vs. 4.3-rc soon since I think it is a worthwhile bugfix for 4.3. George, what does your release
manager's hat
Quoted 9 lines
Quoted 5 lines
Quoted 1 line
think?
There are white space issues with this patch on this thread as it is, so I re-issued it more recently directly from git, as is the preferred method I think.
It's certainly less error prone. Do you have the message-id handy so I can find the right version?
Date: Sat, 22 Jun 2013 13:38:11 +0100
Message-Id: <[email protected]>
Quoted 7 lines
Quoted 4 lines
As was suggested by David Sutton, there are probably more issues with this script than has been covered so far, but this change makes suspension and restoration work for me, at least. He suggests there are problems with zombies, etc.
You mean the handling of zombies by this script, rather than it somehow causing zombies?
Yes, handling of zombies.
Quoted 5 lines
Zombie domains are already themselves a bug in and of themselves so if that can be reproduced we'd like to hear about it, as for the script's handling of those zombies if/when they occur, I think it's probably something to deal with in 4.4.
This is something that David Sutton made comment on the original "users" thread. Without looking back, I seem to recall he'd spotted a bug in the xendomains script's handling rather than experiencing it. I have no experience of the issue. The reason for mentioning it was I just wanted to comment that my patch and testing wasn't a designed to fix all issues with xendomains, just the ones I had experience of.
Quoted 81 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Modifications to xendomains so that it correctly identifies a new
domain
Quoted 1 line
Quoted 1 line
Quoted 1 line
entry when parsing the output of xl list -l. For both SXP and
JSON
Quoted 1 line
Quoted 1 line
Quoted 1 line
outputs, it was failing to spot a new domain entry and was saving
the
Quoted 1 line
Quoted 1 line
Quoted 1 line
second domain under a filename generated from the first
domain's name.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
I have listed this as RFC because although it is a patch against
4.3RC5,
Quoted 1 line
Quoted 1 line
Quoted 1 line
I have not had a chance to test against RC5, only 4.2.2. I
won't get an
Quoted 1 line
Quoted 1 line
Quoted 1 line
opportunity until the weekend, so I invite comment and anybody to
give
Quoted 1 line
Quoted 1 line
Quoted 1 line
it a test against RC5. Ian C has already commented elsewhere that
the xl
Quoted 1 line
Quoted 1 line
Quoted 1 line
list -l JSON output has been altered between 4.2.x and 4.3RC5, so
this
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
might affect the indentation (the 4 spaces in the middle of the
LIST_GREPvariable) - the trigger for new domain data is '{' in
Quoted 2 lines
Quoted 2 lines
JSON
Quoted 1 line
version (in at least 4.2.2) and '(domain' in SXP version.
Not
Quoted 4 lines
Quoted 4 lines
tested
Quoted 3 lines
against xm.
It seems there is a problem in 4.2.2's implementation of SXP
output of
Quoted 1 line
Quoted 1 line
Quoted 1 line
xl list -l in that all domain ID's are outputted as -1. Ian C
suggested
Quoted 1 line
Quoted 1 line
Quoted 1 line
applying a change that originally went into 4.3 to resolve this
issue.
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
This seemed to do the trick (see thread [Xen-users] DomU suspension/hibernation )
Would you be able to submit that backport as a patch against the 4.2 staging branch and CC myself and Ian Jackson <[email protected]> ?
This isn't a straight forward backport, since the majority of the
commit
Quoted 1 line
Quoted 1 line
is not a suitable candidate, but if you reference in the commit
message
Quoted 1 line
Quoted 1 line
the original commit id/subject and point out that only the one hunk is
a
Quoted 1 line
Quoted 1 line
useful bug fix which is why it's been split out then I think it
would be
Quoted 5 lines
Quoted 1 line
fine to have in the next 4.2 release.
I'll give this a go, but it will be a learning experience. I don't recall seeing any backporting info in the patch submission notes but I will take another look.
Thanks. It's not that common to have to do things this way (mostly we take the entire patch) so there isn't much in the way of docs. If you just treat it for the most part like a regular submission and explain what is going on in the commit message with references to the original commit ID and title then you won't go far wrong.
Quoted 2 lines
Who signs a (partial) backport off? Can't be me, because I didn't
write it. Or can it? or is it copied from the original submission?I think it would be appropriate to retain the original signed-off-by(s) and acks etc and append your own. Some people like to do:
Commit message
Signed-off-by Original Author <[email protected]>Acked-by:
Backported to X.Y
Signed-off-by Back Porter <[email protected]>Or something like that, which is fine IMHO. Or if your commit message makes it clear enough what is going on then just tacking your S-o-b onto the original blocks of S-o-b's would be fine.
Quoted 6 lines
Ian J, does that sound about right? The issue is that one hunk of
a73a7a0c647a"xl: Remove global domid and enable -Wshadow" is actually a
useful fix but the commit as a whole is large and unsuitable for backporting IMHO.
Okay, will look into it.
Quoted 8 lines
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Reply below,
Quoted 10 lines · Ian Murray
Date: Sat, 22 Jun 2013 13:38:11 +0100
Message-Id: <[email protected]>Quoted 5 lines
Quoted 4 lines
As was suggested by David Sutton, there are probably more issues with this script than has been covered so far, but this change makes suspension and restoration work for me, at least. He suggests there are problems with zombies, etc.
Quoted 6 lines
Quoted 2 lines
You mean the handling of zombies by this script, rather than it somehow causing zombies?
Yes, handling of zombies.
Yes, it was handling of zombies - in particular the xendomains script was
making use of the state information of the various domains, which isn't part of the information exported by xl list -l in either format
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 32 lines
________________________________
From: David Sutton <[email protected]>
To: Ian Murray <[email protected]>
Cc: Ian Campbell <[email protected]>; George Dunlap <[email protected]>; Joshua Tuttle <[email protected]>; Ian Jackson <[email protected]>; "[email protected]" <[email protected]>
Sent: Tuesday, 25 June 2013, 16:14
Subject: Re: [Xen-devel] [PATCH] [RFC] Fix RegEx Issues with xendomains for both SXP and JSON outputs of lx list -lReply below,
Quoted 10 lines · Ian Murray
Date: Sat, 22 Jun 2013 13:38:11 +0100
Message-Id: <[email protected]>Quoted 5 lines
Quoted 4 lines
As was suggested by David Sutton, there are probably more issues with this script than has been covered so far, but this change makes suspension and restoration work for me, at least. He suggests there are problems with zombies, etc.
Quoted 9 lines
Quoted 7 lines
Quoted 2 lines
You mean the handling of zombies by this script, rather than it somehow causing zombies?
Yes, handling of zombies.
Yes, it was handling of zombies - in particular the xendomains script was making use of the state information of the various domains, which isn't part of the information exported by xl list -l in either format
I am guessing, but I would say the script used to use xl/xm list without the -l and thiis is where $state was set originally. As you point this isn't available from xl list -l (should it be?). If I was approaching this as a re-write, the first thing I would do would be to devise some test cases for all the things this script is supposed to deal with. I don't know how to create zombies at will, for example. Perhaps the hypervisor gurus do. Until that can be done, this script is going to be hard to test properly. Just my opinion.
Quoted 5 lines
Quoted 38 lines · Ian Murray
Quoted 38 lines
________________________________
From: David Sutton <[email protected]>
To: Ian Murray <[email protected]>
Cc: Ian Campbell <[email protected]>; George Dunlap <[email protected]>; Joshua Tuttle <[email protected]>; Ian Jackson <[email protected]>; "[email protected]" <[email protected]>
Sent: Tuesday, 25 June 2013, 16:14
Subject: Re: [Xen-devel] [PATCH] [RFC] Fix RegEx Issues with xendomains for both SXP and JSON outputs of lx list -lReply below,
Quoted 17 lines · Ian Murray
Date: Sat, 22 Jun 2013 13:38:11 +0100
Message-Id: <[email protected]>Quoted 7 lines
Quoted 4 lines
As was suggested by David Sutton, there are probably more issues with this script than has been covered so far, but this change makes suspension and restoration work for me, at least. He suggests there are problems with zombies, etc.
You mean the handling of zombies by this script, rather than it somehow causing zombies?
Yes, handling of zombies.
Quoted 7 lines
Quoted 1 line
Yes, it was handling of zombies - in particular the xendomains script
was making use of the state information of the various domains, which isn't part of the information exported by xl list -l in either format
Quoted 1 line
I am guessing, but I would say the script used to use xl/xm list without the -l and thiis is where $state was set originally.
That sounds like a good bet.
Quoted 6 lines
As you point this isn't available from xl list -l (should it be?). If
I was approaching this as a re-write, the first thing I would do would be to devise some test cases for all the things this script is supposed to deal with. I don't know how to create zombies at will, for example. Perhaps the hypervisor gurus do. Until that can be done, this script is going to be hard to test properly. Just my opinion.
If you can create zombies then that is a bug I think, which we would fix and break your test case ;-)
If I were going to write test cases for this script I would start by collecting a library of "xl list -l" outputs (both real world and handwritten) and devise a test mode which sucked this in instead of running the command and operated in a dry-run mode.
This is effectively what we've done, to a greater or lesser extent (mostly lesser...), for xl disk stanza parsing (tools/libxl/check-xl-disk-parse) or pygrub (tools/pygrub/examples/). It's nice because when someone reports a bug you can just add their output to the set of things you test.
Ian.
----- Original Message -----
Quoted 5 lines
From: Ian Campbell <[email protected]>
To: Ian Murray <[email protected]>
Cc: David Sutton <[email protected]>; George Dunlap <[email protected]>; Joshua Tuttle <[email protected]>; Ian Jackson <[email protected]>; "[email protected]" <[email protected]>
Sent: Wednesday, 26 June 2013, 11:50
Subject: Re: [Xen-devel] [PATCH] [RFC] Fix RegEx Issues with xendomains for
both SXP and JSON outputs of lx list -l
Quoted 67 lines · Ian Murray
Quoted 10 lines
Quoted 10 lines
________________________________
From: David Sutton <[email protected]>
To: Ian Murray <[email protected]>
Cc: Ian Campbell <[email protected]>; George Dunlap<[email protected]>; Joshua Tuttle <[email protected]>; Ian Jackson <[email protected]>; "[email protected]" <[email protected]>
Quoted 2 lines
Quoted 2 lines
Sent: Tuesday, 25 June 2013, 16:14
Subject: Re: [Xen-devel] [PATCH] [RFC] Fix RegEx Issues with xendomainsfor both SXP and JSON outputs of lx list -l
Quoted 7 lines
Quoted 7 lines
Reply below,
On Tue, Jun 25, 2013 at 9:55 AM, Ian Murray
Quoted 4 lines · <[email protected]> wrote:
Quoted 4 lines
Quoted 4 lines
Date: Sat, 22 Jun 2013 13:38:11 +0100
Message-Id:Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
As was suggested by David Sutton, there are probably more
issues with
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
this script than has been covered so far, but this change
makes
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
suspension and restoration work for me, at least. He
suggests there
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
are problems with zombies, etc.
You mean the handling of zombies by this script, rather than
it somehow
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
causing zombies?
Yes, handling of zombies.
Quoted 7 lines
Quoted 1 line
Yes, it was handling of zombies - in particular the xendomains script
was making use of the state information of the various domains, which isn't part of the information exported by xl list -l in either format
Quoted 1 line
I am guessing, but I would say the script used to use xl/xm list without the -l and thiis is where $state was set originally.
That sounds like a good bet.
Quoted 6 lines
As you point this isn't available from xl list -l (should it be?). If
I was approaching this as a re-write, the first thing I would do would be to devise some test cases for all the things this script is supposed to deal with. I don't know how to create zombies at will, for example. Perhaps the hypervisor gurus do. Until that can be done, this script is going to be hard to test properly. Just my opinion.
Quoted 2 lines
If you can create zombies then that is a bug I think, which we would fix and break your test case ;-)
I was thinking of...
xl zombify <domainid> :)
Quoted 11 lines
If I were going to write test cases for this script I would start by collecting a library of "xl list -l" outputs (both real world and handwritten) and devise a test mode which sucked this in instead of running the command and operated in a dry-run mode.
This is effectively what we've done, to a greater or lesser extent (mostly lesser...), for xl disk stanza parsing (
tools/libxl/check-xl-disk-parse) or pygrub (tools/pygrub/examples/). It's nice because when someone reports a bug you can just add their output to the set of things you test.
I think that is a good idea except it doesn't capture an issue if the output of the real xl list -l changes. Besides, I liked the idea of David S. to get away from parsing xl list -l. Assuming this is what happened, I am not sure of the design logic of changing the behaviour of xl list -l to work with JSON. IMHO, I would say better to add another option for that output, so as not to cause compatibility issues.
Anyway, one of the for future, I think.
Quoted 3 lines
Ian.