You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Oded Priva <od...@ironsrc.com> on 2017/03/16 08:30:15 UTC

bulk edit connections

Hi, 
I have a periodic process ( every 10 minutes ) that checks for active VMs. (
about 150 connections )

I'm looking for the best way to update the connection list. 

Currently I'm truncating all connection tables and inserting new
connections. I'm using this
script <https://gist.github.com/odedpriva/5d600368744b9b02bcd25539f213c449>  

The problem I'm facing is when trying to login after updating MYSQL using
this method is that the page upload is 'stuck' on
'guacamole/api/session/data/mysql/connectionGroups/ROOT/tree?token=***'
route. I tried to disable cache or using incognito and it didn't help. 

what is the best way to replace bunch of connections in a periodic process ? 

Here are the table I TRUNCATE :
      'guacamole_connection_permission',
      'guacamole_connection_parameter',
      'guacamole_connection_history',
      'guacamole_connection_group_permission',
      'guacamole_connection_group',
      'guacamole_connection'


<http://apache-guacamole-incubating-users.2363388.n4.nabble.com/file/n566/Screen_Shot_2017-03-16_at_10.png> 



--
View this message in context: http://apache-guacamole-incubating-users.2363388.n4.nabble.com/bulk-edit-connections-tp566.html
Sent from the Apache Guacamole (incubating) - Users mailing list archive at Nabble.com.

Re: bulk edit connections

Posted by Mike Jumper <mi...@guac-dev.org>.
On Thu, Mar 16, 2017 at 1:30 AM, Oded Priva <od...@ironsrc.com> wrote:

> Hi,
> I have a periodic process ( every 10 minutes ) that checks for active VMs.
> (
> about 150 connections )
>
> I'm looking for the best way to update the connection list.
>
> Currently I'm truncating all connection tables and inserting new
> connections. ...


You are looking for a solution to the wrong problem [1].

Don't think of it as "updating the connection list". There is no central
connection list inherent to Guacamole. Remember that even the MySQL
authentication system that you're currently using is a Guacamole extension,
and just as that MySQL auth extension produces a list of connections from
the contents of tables, so too can you write an extension which produces a
dynamic list of connections from active VMs.

There's a brief example of how the extension system works here:

http://guacamole.incubator.apache.org/doc/gug/custom-auth.html

The extensions which are part of the Guacamole codebase can serve as more
involved examples of what can be done with the extension API, but things
don't need to be too complicated if all you're doing is producing a list of
connections.

- Mike

[1] http://xyproblem.info/