Skip to contentSkip to conversation

Proposal: deprecate "vncviewer" option in xl domain config file

DISCUSSION Wei Liu 3 participants 7 messages Apr 22, 2014 – Apr 23, 2014

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

Hi all

When I'm working on (de-)serialization of domain configurations I found "vncviewer". I now propose to deprecate it.

What it does is that if you have it set in your domain's config file and do "xl create cfg", xl will automatically spawn a vncviewer for you. This option actually controls the creation process of a domain but has nothing to do with domain configuration at all.

This option is buggy because it's also saved as part of domain state when you do save / restore. Consider user migrates a domain to a remote host, xl will try to auto-spawn vncviewer on the new host. This behavior doesn't make sense at all.

Further more it becomes an obstacle for the work to (de-)serialization domain configurations. If we want to preserve this option we then need to create abstraction for a config file in xl or libxl. This either introduces lots of work without much benefit (if we add out-of-band infomation in xl) or pollute libxl public interface.

I propose to deprecate this option.

What I will do is:
1. config file still supports this option but it will prints out a warning about its deprecation.
2. this option is not saved as domain state when doing save / restore, so when you restore a domain xl will not auto-spawn vncviewer.

This may create a minor regression, but it's in no way critical. In any case the right way to auto-spawn vncviewer is to use "-V" in "xl create". And existing user of this config file option can also use "-V" to work around this regression.

Comments?

Wei.

#1 lore raw

Wei Liu writes ("Proposal: deprecate "vncviewer" option in xl domain config file"):

Quoted 2 lines

When I'm working on (de-)serialization of domain configurations I found "vncviewer". I now propose to deprecate it.

...

Quoted 7 lines

I propose to deprecate this option.

What I will do is:
1. config file still supports this option but it will prints out a warning about its deprecation.
2. this option is not saved as domain state when doing save / restore, so when you restore a domain xl will not auto-spawn vncviewer.

This comes out of a conversation between Wei and me. For the record, I think this is the right approach.

The existing behaviour, where "xl restore" might start a vncviewer if the previously saved domain config had specified vncviewer=1, is IMO insane (and I doubt intentional on anyone's part).

Thanks,
Ian.

#2 lore raw
In reply to Wei Liu
Quoted 5 lines · Wei Liu

Hi all

When I'm working on (de-)serialization of domain configurations I found "vncviewer". I now propose to deprecate it.

Quoted 7 lines

What it does is that if you have it set in your domain's config file and do "xl create cfg", xl will automatically spawn a vncviewer for you. This option actually controls the creation process of a domain but has nothing to do with domain configuration at all.

This option is buggy because it's also saved as part of domain state when you do save / restore.

Where is it saved?

Quoted 18 lines

Consider user migrates a domain to a remote
host, xl will try to auto-spawn vncviewer on the new host. This behavior doesn't make sense at all.

Further more it becomes an obstacle for the work to (de-)serialization domain configurations. If we want to preserve this option we then need to create abstraction for a config file in xl or libxl. This either introduces lots of work without much benefit (if we add out-of-band infomation in xl) or pollute libxl public interface.

I propose to deprecate this option.

What I will do is:
1. config file still supports this option but it will prints out a warning about its deprecation.
2. this option is not saved as domain state when doing save / restore, so when you restore a domain xl will not auto-spawn vncviewer.

Quoted 6 lines

This may create a minor regression, but it's in no way critical. In any case the right way to auto-spawn vncviewer is to use "-V" in "xl create". And existing user of this config file option can also use "-V" to work around this regression.

Comments?

Rather than throwing the baby out with the bathwater can't we just say that this option is only obeyed for the initial domain creation and not for any subsequent migration or restore? What would avoid the need to propagate it along with the save/migrate image.

Ian.

author
#3 lore raw
Quoted 11 lines · Ian Campbell
Quoted 10 lines · Wei Liu

Hi all

When I'm working on (de-)serialization of domain configurations I found "vncviewer". I now propose to deprecate it.

What it does is that if you have it set in your domain's config file and do "xl create cfg", xl will automatically spawn a vncviewer for you. This option actually controls the creation process of a domain but has nothing to do with domain configuration at all.

Quoted 5 lines
Quoted 2 lines

This option is buggy because it's also saved as part of domain state when you do save / restore.

Where is it saved?

The domain config file is saved, then used when restoring. Restoring process involves re-parsing that config file.

Quoted 23 lines
Quoted 23 lines

Consider user migrates a domain to a remote
host, xl will try to auto-spawn vncviewer on the new host. This behavior doesn't make sense at all.

Further more it becomes an obstacle for the work to (de-)serialization domain configurations. If we want to preserve this option we then need to create abstraction for a config file in xl or libxl. This either introduces lots of work without much benefit (if we add out-of-band infomation in xl) or pollute libxl public interface.

I propose to deprecate this option.

What I will do is:
1. config file still supports this option but it will prints out a warning about its deprecation.
2. this option is not saved as domain state when doing save / restore, so when you restore a domain xl will not auto-spawn vncviewer.

This may create a minor regression, but it's in no way critical. In any case the right way to auto-spawn vncviewer is to use "-V" in "xl create". And existing user of this config file option can also use "-V" to work around this regression.

Quoted 7 lines
Quoted 1 line

Comments?

Rather than throwing the baby out with the bathwater can't we just say that this option is only obeyed for the initial domain creation and not for any subsequent migration or restore? What would avoid the need to propagate it along with the save/migrate image.

I think this is just wording issue. My "xl-json" format patch does this already. I'm OK with any approach as long as I don't need to propogate it. :-P

Wei.

Quoted 2 lines

Ian.

#4 lore raw

Wei Liu writes ("Re: Proposal: deprecate "vncviewer" option in xl domain config file"):

Quoted 5 lines · Ian Campbell
Quoted 1 line

Where is it saved?

The domain config file is saved, then used when restoring. Restoring process involves re-parsing that config file.

Ie the domain configuration file provided to xl create is saved in the libxl userdata. During xl save, that domain configuration file is recorded in the save image. During xl restore, it is extracted from the save image and reparsed. If the original configuration file contained "vncviewer=1", this will result in xl restore running the vncviewer, regardless of xl restore's command line arguments.

Quoted 8 lines
Quoted 4 lines

Rather than throwing the baby out with the bathwater can't we just say that this option is only obeyed for the initial domain creation and not for any subsequent migration or restore? What would avoid the need to propagate it along with the save/migrate image.

I think this is just wording issue. My "xl-json" format patch does this already. I'm OK with any approach as long as I don't need to propogate it. :-P

Precisely.

Although, I would go further and say that this kind of thing shouldn't be in the domain config file. The same config file should be able to start a domain both with and without automatically running vncviewer.

After all we don't have an xl domain config file option for automatically running xenconsole - we rely, only, on the -c option for that.

Ian.

#5 lore raw
Quoted 7 lines · Ian Jackson

Wei Liu writes ("Re: Proposal: deprecate "vncviewer" option in xl domain config file"):

Quoted 5 lines · Ian Campbell
Quoted 1 line

Where is it saved?

The domain config file is saved, then used when restoring. Restoring process involves re-parsing that config file.

Quoted 6 lines

Ie the domain configuration file provided to xl create is saved in the libxl userdata. During xl save, that domain configuration file is recorded in the save image. During xl restore, it is extracted from the save image and reparsed. If the original configuration file contained "vncviewer=1", this will result in xl restore running the vncviewer, regardless of xl restore's command line arguments.

Right, but Wei is removing this reparsing of the vncviewer.

Quoted 10 lines
Quoted 8 lines
Quoted 4 lines

Rather than throwing the baby out with the bathwater can't we just say that this option is only obeyed for the initial domain creation and not for any subsequent migration or restore? What would avoid the need to propagate it along with the save/migrate image.

I think this is just wording issue. My "xl-json" format patch does this already. I'm OK with any approach as long as I don't need to propogate it. :-P

Precisely.

Yes, I think it was unclear whether the intention was only to deprecate the option on restore/migration or entirely. The former is unequivocally fine IMHO.

Quoted 7 lines

Although, I would go further and say that this kind of thing shouldn't be in the domain config file. The same config file should be able to start a domain both with and without automatically running vncviewer.

After all we don't have an xl domain config file option for automatically running xenconsole - we rely, only, on the -c option for that.

I mostly agree, but this is the sort of thing which xend users might think was a functional regression, not that this should be a blocker if we really think this behaviour is intolerably bad/strange.

Ian.

author
#6 lore raw
Quoted 36 lines · Ian Campbell
Quoted 7 lines · Ian Jackson

Wei Liu writes ("Re: Proposal: deprecate "vncviewer" option in xl domain config file"):

Quoted 5 lines · Ian Campbell
Quoted 1 line

Where is it saved?

The domain config file is saved, then used when restoring. Restoring process involves re-parsing that config file.

Quoted 6 lines

Ie the domain configuration file provided to xl create is saved in the libxl userdata. During xl save, that domain configuration file is recorded in the save image. During xl restore, it is extracted from the save image and reparsed. If the original configuration file contained "vncviewer=1", this will result in xl restore running the vncviewer, regardless of xl restore's command line arguments.

Right, but Wei is removing this reparsing of the vncviewer.

Quoted 10 lines
Quoted 8 lines
Quoted 4 lines

Rather than throwing the baby out with the bathwater can't we just say that this option is only obeyed for the initial domain creation and not for any subsequent migration or restore? What would avoid the need to propagate it along with the save/migrate image.

I think this is just wording issue. My "xl-json" format patch does this already. I'm OK with any approach as long as I don't need to propogate it. :-P

Precisely.

Yes, I think it was unclear whether the intention was only to deprecate the option on restore/migration or entirely. The former is unequivocally fine IMHO.

Quoted 4 lines

Although, I would go further and say that this kind of thing shouldn't be in the domain config file. The same config file should be able to start a domain both with and without automatically running vncviewer.

Quoted 8 lines
Quoted 3 lines

After all we don't have an xl domain config file option for automatically running xenconsole - we rely, only, on the -c option for that.

I mostly agree, but this is the sort of thing which xend users might think was a functional regression, not that this should be a blocker if we really think this behaviour is intolerably bad/strange.

OK. So the plan can be:
1. retain parsing "vncviewer" for config file in this release and print a warning to users this option may be removed in future release
2. don't save this option in save image

Wei.

Quoted 1 line

Ian.