www.cendio.com
Bug 7188 - There is no possibility to group agents within a ThinLinc cluster
: There is no possibility to group agents within a ThinLinc cluster
Status: CLOSED FIXED
: ThinLinc
VSM Server
: trunk
: PC Unknown
: P2 Normal
: 4.10.0
Assigned To:
:
:
:
: 5362
  Show dependency treegraph
 
Reported: 2018-05-24 10:09 by
Modified: 2018-10-03 17:06 (History)
Acceptance Criteria:
* Administrator should be able to associate users and/or groups to a subcluster in order for the ThinLinc server to automatically select which agent to start new sessions on. * Documentation should be written in TAG and hinting comments in configuration file. TAG documentation should describe new configuration parameters and new concepts. * Automatic unit and integration tests should be added to cover the changes. * Error handling with message to the end user when user is not associated with a subcluster (user or group) and there is no Default subcluster configured. * Seamless migration of /vsmserver/terminalservers to subcluster agents when upgrading ThinLinc * Seamless migration of /vsmserver/explicit_agentselection into subcluster structure when upgrading ThinLinc * Web Administration UI should reflect the changes * Change of configuration should be added to specific section in release notes


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From cendio 2018-05-24 10:09:55
Currently a ThinLinc cluster requires all agents to share configuration and
offer the same applications and desktops. For example one might want to have 2
agents hosting an application and 4 agents to host normal desktop. Today
customers are using the explicit_agentselection for this case but does not get
loadbalancing.
------- Comment #1 From cendio 2018-05-24 10:40:39 -------
A simple idea is to introduce grouping of agents in vsmserver which are mapped
to users / groups, and let the loadbalancer do the magic of choosing which
agent to create a new session on.

Current configuration of cluster looks like this:

 [/vsmserver]
 terminalservers = 127.0.0.1

and it could be changed into this:

 [/vsmserver/subcluster/Default]
 terminalservers = 127.0.0.1
 groups =

and if an administrator wants to add a subcluster (group of agents) for devs it
could look like this:

 [/vsmserver/subcluster/Devs]
 terminalservers = 127.0.0.2
 groups = Developers
------- Comment #2 From cendio 2018-05-24 10:53:47 -------
Acceptance criteria:

- Administrator should be able to associate users and/or groups to a subcluster
in order for the ThinLinc server to automatically select which agent to start
new sessions on.

- Seamless migration of /vsmserver/terminalservers when upgrading from an older
version of the ThinLinc server.

- Documentation should be written in TAG and hinting comments in configuration
file. TAG documentation should describe new configuration parameters and new
concepts.

- Automatic unit and integration tests should be added to cover the changes.

- Change of configuration should be added to specific section in release notes.

- Web Administration UI should reflect the changes.
------- Comment #3 From cendio 2018-05-24 12:32:52 -------
Acceptance criteria:

- Error handling with message to the end user when user is not associated with
a subcluster (user or group) and there is no Default subcluster configured.
------- Comment #4 From 2018-05-24 23:14:26 -------
This is a good idea, but i think it is better to let the user choose which
subcluster to join. Like https://www.cendio.com/bugzilla/show_bug.cgi?id=5362
...

But still a very good idea.
------- Comment #5 From cendio 2018-05-25 12:30:43 -------
(In reply to comment #4)
> This is a good idea, but i think it is better to let the user choose which
> subcluster to join. Like https://www.cendio.com/bugzilla/show_bug.cgi?id=5362
> ...
> 
> But still a very good idea.

Peter, you can view this as a first step in that direction. This server-side
implementation can be expanded upon and adding a user-choice is a smaller step
once this is in place.
------- Comment #6 From cendio 2018-05-28 10:07:05 -------
This change means moving /vsmserver/terminalservers to
/vsmserver/subcluster/<name>/terminalservers. We will also rename the parameter
terminalservers to agents:


  /vsmserver/subcluster/<name>/agents
------- Comment #7 From cendio 2018-05-28 10:11:52 -------
(In reply to comment #0)

> Today customers are using the explicit_agentselection for this case but does
> not get loadbalancing.
>

We have decided to remove explicit_agentselection and an upgrade should migrate
the current explicit_agentselection configuration into subcluster structure.
------- Comment #8 From cendio 2018-05-28 10:15:24 -------
Acceptance criteria:

 - upgrade should migrate the current explicit_agentselection configuration
into subcluster structure
------- Comment #17 From cendio 2018-06-01 16:49:15 -------
That should be all:

* Subcluster implementation
* Automatic tests
* Documentation
* Web Admin GUI
* Updated tl-rsync-all and tl-ssh-all
* Removed explicit_agentselection
* Renamed terminalservers to agents
* Seamless migration possible through tl-setup (see bug 7193)
* Release notes
------- Comment #18 From 2018-06-01 16:57:43 -------
(In reply to comment #5)
> (In reply to comment #4)
> > This is a good idea, but i think it is better to let the user choose which
> > subcluster to join. Like https://www.cendio.com/bugzilla/show_bug.cgi?id=5362
> > ...
> > 
> > But still a very good idea.
> 
> Peter, you can view this as a first step in that direction. This server-side
> implementation can be expanded upon and adding a user-choice is a smaller step
> once this is in place.

So what happens if a user have access to multiple subclusters? There is no way
to choose....
------- Comment #19 From cendio 2018-06-02 23:59:58 -------
(In reply to comment #18)
> 
> So what happens if a user have access to multiple subclusters? There is no way
> to choose....

Subclusters will be limited to admin configuration for now.

If a user is associated with multiple clusters the system has been configured
incorrectly. In this case the user will automatically end up on one of the
subclusters and a warning will be logged for the admin.
------- Comment #21 From cendio 2018-06-04 09:26:35 -------
One of the integration tests fail, reopening.
------- Comment #24 From cendio 2018-06-04 13:58:54 -------
(In reply to comment #21)
> One of the integration tests fail, reopening.

Found and fixed a couple of typos in the tests.
------- Comment #26 From cendio 2018-06-08 14:23:34 -------
Started testing, and mostly works fine, but two bugs found so far:

a) User matching is doing using username, not uid, so it will not handle
aliases properly (e.g. case insensitive systems).

b) You get a warning about a user qualifying for multiple subclusters via their
groups even if the user is listed explicitly as a user. I.e.

[/vsmserver/subclusters/A]
users=userA
groups=group1withA

[/vsmserver/subclusters/B]
users=
groups=group2withA

There is no ambiguity here, so the system shouldn't warn.
------- Comment #28 From cendio 2018-06-11 14:42:04 -------
There is a check to warn the admin if an agent is defined in multiple sub
clusters. Unfortunately it easily misses things right now.

The check triggers when a new session is created, and it only checks the first
("best") agent. If that agent fails to create a session then the rest do not
get the sanity check.

Perhaps we should do the sanity check on startup so that everything is checked
all at once? It would also mean getting an early warning for the admin.
------- Comment #29 From cendio 2018-06-11 14:45:15 -------
The new images for the documentation aren't packaged properly.
------- Comment #31 From cendio 2018-06-11 15:10:09 -------
(In reply to comment #26)
> Started testing, and mostly works fine, but two bugs found so far:
> 
> a) User matching is doing using username, not uid, so it will not handle
> aliases properly (e.g. case insensitive systems).
>

Commit r33401 solves this issue

> b) You get a warning about a user qualifying for multiple subclusters via their
> groups even if the user is listed explicitly as a user. I.e.
> 
> [/vsmserver/subclusters/A]
> users=userA
> groups=group1withA
> 
> [/vsmserver/subclusters/B]
> users=
> groups=group2withA
> 
> There is no ambiguity here, so the system shouldn't warn.

Commit r33402 solves this issue
------- Comment #33 From cendio 2018-06-11 16:22:57 -------
(In reply to comment #29)
> The new images for the documentation aren't packaged properly.
------- Comment #35 From cendio 2018-06-11 16:30:40 -------
(In reply to comment #33)
> (In reply to comment #29)
> > The new images for the documentation aren't packaged properly.

Fixed in commit r33404
------- Comment #36 From cendio 2018-06-12 11:02:05 -------
(In reply to comment #31)
> (In reply to comment #26)
> > Started testing, and mostly works fine, but two bugs found so far:
> > 
> > a) User matching is doing using username, not uid, so it will not handle
> > aliases properly (e.g. case insensitive systems).
> >
> 
> Commit r33401 solves this issue
> 

Works well now.

> > b) You get a warning about a user qualifying for multiple subclusters via their
> > groups even if the user is listed explicitly as a user. I.e.
> > 
> 
> Commit r33402 solves this issue

Also works well.

(In reply to comment #35)
> (In reply to comment #33)
> > (In reply to comment #29)
> > > The new images for the documentation aren't packaged properly.
> 
> Fixed in commit r33404

Looks fine now.

(In reply to comment #28)
> There is a check to warn the admin if an agent is defined in multiple sub
> clusters. Unfortunately it easily misses things right now.
> 

It now nicely warns about duplication of agents, users and groups.
------- Comment #37 From cendio 2018-06-12 11:05:12 -------
> * Administrator should be able to associate users and/or groups to a subcluster in order for the ThinLinc server to automatically select which agent to start new sessions on.
> 

✓ Tested various combinations of users and groups (including conflicting ones)

> * Documentation should be written in TAG and hinting comments in configuration file. TAG documentation should describe new configuration parameters and new concepts.
> 

✓ Seems easy enough to grasp. Related topics also updated AFAICT.

> * Automatic unit and integration tests should be added to cover the changes.
> 

✓ Seem to cover the essentials

> * Error handling with message to the end user when user is not associated with a subcluster (user or group) and there is no Default subcluster configured.
> 

✓ User gets a "no available agents" message

> * Seamless migration of /vsmserver/terminalservers to subcluster agents when upgrading ThinLinc
> 

✓ Correctly moved to Default cluster

> * Seamless migration of /vsmserver/explicit_agentselection into subcluster structure when upgrading ThinLinc
> 

✓ Correctly moved to new subclusters, and merged when possible

> * Web Administration UI should reflect the changes
> 

✓ Works well. I was able to configure everything using the web ui.

> * Change of configuration should be added to specific section in release notes

✓ Looks good.
------- Comment #40 From cendio 2018-06-13 10:46:56 -------
We aren't handling unicode usernames (and probably groups) properly.
------- Comment #43 From cendio 2018-06-15 10:15:16 -------
Verified that subclusters work well with unicode usernames now.