Skip to content
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

CP-10204: XenCenter: guest RDP control #275

Merged
merged 3 commits into from Jan 21, 2015

Conversation

cheng-z
Copy link
Member

@cheng-z cheng-z commented Dec 8, 2014

This code change is to add changes as bellow:

  1. The option "Enable Remote Desktop console scanning"change to"Enable Remote Desktop console scanning (XenServer 6.5 and earlier)"
  2. Remove connection between "Automatically switch to the Remote Desktop console when it becomes available" and "Enable Remote Desktop console scanning"
  3. Add "Turn on Remote desktop"

One thing need to modify is that "CreedenceorGreater" funtion check should be change.

Signed-off-by: Cheng Zhang cheng.zhang@citrix.com

@stephen-turner
Copy link
Contributor

Waiting on this until the requirements are finalised.

@huizh
Copy link
Contributor

huizh commented Dec 15, 2014

Based on the discussion of the requirements, guest agent would watch and update RDP status to ensure it be correct for XenCenter to display corresponding button.
My understanding is this would not impact XenCenter code with this pull request.
Stephen, please could you correct me if I misunderstand anything?
Thanks.

@stephen-turner
Copy link
Contributor

We don't yet know whether the guest agent can do that (with sufficient performance), so I don't want to take this pull request and then find we have to revert much of it.

@huizh
Copy link
Contributor

huizh commented Dec 15, 2014

Yes, I agree that might be an issue.
Thanks Stephen for the instant response and the comprehensive consideration.

@cheng-z
Copy link
Member Author

cheng-z commented Jan 5, 2015

Hi @stephen-turner & @huizh
I already change the API interface to vm_call_plugin.(Why using this name can refer to xapi-project/xapi-project.github.io#12 (comment))
Also about the windows firewall and watch RDP status issue, I already made pull request to win-guestagent, and the code change already merged into master.

So, @stephen-turner do you think we can start the code review now?

@stephen-turner
Copy link
Contributor

Thank you, Cheng. So just to be clear, with your changes to the guest agent, will XenCenter now get notified even if RDP is turned on or off directly in the guest?

If so, we will proceed with reviewing the pull request.

@cheng-z
Copy link
Member Author

cheng-z commented Jan 6, 2015

Hi @stephen-turner,
Yes, with the change of windows pv tool which I mentioned as guest agent, RDP status change can be notified.

@stephen-turner
Copy link
Contributor

We're planning to review this on Thursday. Sorry, we don't have any free slots today or tomorrow with all the right people.

@@ -11406,6 +11409,9 @@ To learn more about the XenServer Dynamic Workload Balancing feature or to start
<data name="VNC_RDESKTOP" xml:space="preserve">
<value>Sw&amp;itch to Remote Desktop</value>
</data>
<data name="VNC_RDESKTOP_TRUN_ON" xml:space="preserve">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling mistake: should be TURN not TRUN

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already change the typo. Thanks.

Signed-off-by: Cheng Zhang <cheng.zhang@citrix.com>
@cheng-z cheng-z force-pushed the CP-10204 branch 3 times, most recently from e9d1eab to 6a49c83 Compare January 9, 2015 09:48
@stephen-turner
Copy link
Contributor

You asked about CreamOrGreater(): feel free to write this function.

Let us know when you want us to review it again.

@stephen-turner
Copy link
Contributor

You wrote:

Since this api call can not return correct result of RDP enable or not. I add the connect operation in
guestMetrics_PropertyChanged. Thanks.

The preferred behaviour here is different depending whether the user turned on RDP by pressing the button in XenCenter, or by turning it on in the guest.

  1. If the user turned on RDP by pressing the button in XenCenter, we should always switch to RDP as soon as it's available
  2. But if the user turned on RDP in-guest, we might or might not switch to RDP depending whether the setting "Automatically switch to the Remote Desktop console when it becomes available" is on or off.

If this is too difficult to implement, we should always do 2., and change the text in the dialog to read simply "Would you like to turn on Remote Desktop in this VM? [Yes] [No]"

@cheng-z cheng-z force-pushed the CP-10204 branch 5 times, most recently from e626f47 to f3c79d0 Compare January 12, 2015 08:45
Signed-off-by: Cheng Zhang <cheng.zhang@citrix.com>
@cheng-z
Copy link
Member Author

cheng-z commented Jan 12, 2015

Hi @stephen-turner , thank you for you reminder.
I doing following changes to meet your conditons:
When RDP status is on and currently the VM using VNC, these two condition you mentioned will be checked to make decision about try to connect RDP or not.
Those logic is also in guestMetrics_PropertyChanged

Current, all rework jobs are been done based on all your comments, and I think we can start the review process again. Thanks a lot.

@stephen-turner
Copy link
Contributor

Sorry I didn't notice before, but this pull request accidentally introduces a new file, XenModel/XenAPI-Extensions/Proxy.cs. Please remove it. (It's large, so I don't even want it added and then deleted again; please make a new, squashed changeset without it). Thanks.

@@ -741,6 +761,11 @@ public void Unpause()
vncScreen.Unpause();
}

private bool RDPDiabledOnCreamOrGreater(IXenConnection conn)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in function name: should be Disabled not Diabled.

@cheng-z
Copy link
Member Author

cheng-z commented Jan 14, 2015

Hi @stephen-turner I already check on all comments and thanks for your great work which help me a lot.
The second round of reword is done. Please help to check the comment and code again.
Thanks a lot.

Signed-off-by: Cheng Zhang <cheng.zhang@citrix.com>
@Zhengchai
Copy link
Contributor

Thank you @stephen-turner Thank you for your review and @cheng--zhang for the discussion, do we have more comments for the codes change to be merged?

@stephen-turner
Copy link
Contributor

Sorry, I still need to do another review, but it's been a really busy week with the train planning.

@stephen-turner
Copy link
Contributor

I have scheduled this for Monday. Apologies for the delay.

@stephen-turner
Copy link
Contributor

The code looks OK to me now, but I wanted to do some smoke testing too. Could you confirm which branch and build has all the changes (xapi and guest agent) on it? I tried with trunk-ring3 build 90554, but it didn't work right: I saw "switch to RDP" when RDP was turned off; no button when RDP was turned on; and I never saw "turn on RDP". But maybe I just haven't got the guest agent changes.

@cheng-z
Copy link
Member Author

cheng-z commented Jan 20, 2015

Hi @stephen-turner, I am so sorry about the test on trunk-ring3. Because this feature also need code change for Windows PV tool, the commit is not merged in trunk-ring3, so the RDP status in trunk-ring3 will not be the correct one. You can use trunk branch build as a test environment. The trunk branch included all changes for this feature.
I also equipped my DT box dt65 with the latest trunk build for your reference.
Thanks.

@stephen-turner
Copy link
Contributor

OK, thanks, I'll try that.

@stephen-turner
Copy link
Contributor

This still isn't working well for me. It doesn't appear to be responding to changes made via the in-guest UI. And when I press "Turn on XenDesktop", the button gets greyed out, but it never connects. I have also seen a state where the remote desktop option is set, but with a warning that I need to configure the Windows firewall too, which I thought is supposed to happen automatically.

I think we should have a meeting to discuss this, rather than continuing to do it in the pull request. I'll set one up for tomorrow.

@stephen-turner
Copy link
Contributor

It turns out that the problems were caused by not having all the guest agent changes on the server I was testing on. It looks good now, so I'm accepting this pull request. There are some minor bugs, but we will take them as separate items.

stephen-turner pushed a commit that referenced this pull request Jan 21, 2015
CP-10204: XenCenter: guest RDP control
@stephen-turner stephen-turner merged commit 10226d3 into xenserver:master Jan 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants