-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xen-dom-mgmt: do not left domain paused on creation #86
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, this was hack. I am fine with this change:
Reviewed-by: Volodymyr Babchuk <[email protected]>
But, could you please add -p
parameter to xu create
command in case someone wants to create domain in paused state? I believe it was needed for PV drivers (or vchan?) debugging.
|
Thanks for review
Yes, it is possible, but after changing |
Well, I am not sure that we need additional parameter. This can be flag in a domain configuration structure. |
|
@@ -742,14 +742,10 @@ int domain_create(struct xen_domain_cfg *domcfg, uint32_t domid) | |||
goto stop_domain_console; | |||
} | |||
|
|||
if (domid == DOMID_DOMD) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems you can drop DOMID_DOMD now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, done.
And API documentation seems need to be updated to mention that domain up and running |
I'd probably agree with @lorc here. This patch will unconditionally change current DomU start sequence from:
--- to ---
If it's safe - ok then. if some doubts - It'd better to add "f_noautostart" in domcfg with default f_noautostart=false. All prods now expect DomD started from static dom_cfg (and use only one static domcfg), so f_noautostart will be "false" and no changes in prods will be needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks everyone for review and suggestions!
And API documentation seems need to be updated to mention that domain up and running
This hack wasn't even mentioned in function description :)
to
domain_create
domain_unpause
domain_post_create
AFAIK, this is correct sequence and should not be a problem, maybe @lorc can correct me.
Since last push:
- removed
#define DOMID_DOMD
- added pausing flag to domain config
- added optional
-p
parameter forxu create
@@ -742,14 +742,10 @@ int domain_create(struct xen_domain_cfg *domcfg, uint32_t domid) | |||
goto stop_domain_console; | |||
} | |||
|
|||
if (domid == DOMID_DOMD) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, done.
Please, the commit message for last patch "xen-shell-cmd: add optional paramenters for pausing domain on creation" should contain cmd run/test example. And seems some spelling issues. |
Currently any of our product do not use config_name in create command. To provide valuable output for command run advanced environment required. I tested flag functionality (set and successfully triggers domain creation logic) and updated help section for xu command.
Can you please clarify? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/paramenters/parameters
Configure spell checker already :)
Acked-by: Volodymyr Babchuk <[email protected]>
Then drop it. If you can't test it without magic. And I can't test it - then drop it from this PR, please? Otherwise, provide full cmd line test sequence results: xu create - without "p"
You have "paramenters" in commit subject. |
For patches 1 & 2: |
Some hacky logic were added previously on domain creation - only Domain-D is unpaused after domain_create(). This looks like hack, that definitely should be removed from mainline library. Signed-off-by: Dmytro Firsov <[email protected]> Acked-by: Volodymyr Babchuk <[email protected]> Reviewed-by: Grygorii Strashko <[email protected]>
Some users may want to left domain in paused state after creation. Add flag for domain config that allows to configure it before passing it to domain_create(). Signed-off-by: Dmytro Firsov <[email protected]> Acked-by: Volodymyr Babchuk <[email protected]> Reviewed-by: Grygorii Strashko <[email protected]>
Previously f_paused flag was introduced to domain configuration struct. Add optional parameter for "xu create" command to left created domain paused after creation. Signed-off-by: Dmytro Firsov <[email protected]> Acked-by: Volodymyr Babchuk <[email protected]>
FYI. Last patch works not as expected. It updates dom-cfg->f_paused and this configuration can't be undone without reboot.
|
Some hacky logic were added previously on domain creation - only Domain-D is unpaused after domain_create(). This looks like hack, that definitely should be removed from mainline library.