[ https://issues.apache.org/jira/browse/GUACAMOLE-1549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17503970#comment-17503970 ]
Massimo Fierro commented on GUACAMOLE-1549: ------------------------------------------- Oh, I am really sorry for taking up your time. I must have been mistakenly browsing the devel branch while trying to understand what was going on, so I didn't even think of looking for another related submission. > EXTENSION_PRIORITY env var is not respected by Docker container > --------------------------------------------------------------- > > Key: GUACAMOLE-1549 > URL: https://issues.apache.org/jira/browse/GUACAMOLE-1549 > Project: Guacamole > Issue Type: Bug > Components: guacamole-client > Affects Versions: 1.4.0 > Environment: OS: Ubuntu 20.04.4 LTS x86_64 > Docker images: v1.4 > Reporter: Massimo Fierro > Priority: Major > > Running guacamole-client and guacd with docker-compose, it seems like my > preferred order of extension loading is not respected. > My docker-compose configuration file looks like the following: > {code:yaml} > version: '2.0' > networks: > guacnetwork_compose: > driver: bridge > services: > guacd: > container_name: guacd_compose > image: guacamole/guacd > networks: > guacnetwork_compose: > restart: always > volumes: > - /home/dockeruser/guacamole-data/drive:/drive:rw > - /home/dockeruser/guacamole-data/record:/record:rw > environment: > GUACD_LOG_LEVEL: debug > guacamole: > container_name: guacamole_compose > depends_on: > - guacd > environment: > GUACD_HOSTNAME: guacd > MYSQL_HOSTNAME: ******* > MYSQL_PORT: 3306 > MYSQL_DATABASE: ******* > MYSQL_USER: ******* > MYSQL_PASSWORD: ******* > OPENID_AUTHORIZATION_ENDPOINT: ******* > OPENID_JWKS_ENDPOINT: ******* > OPENID_ISSUER: ******* > OPENID_CLIENT_ID:******* > OPENID_REDIRECT_URI:******* > EXTENSION_PRIORITY: "mysql,openid" > networks: > guacnetwork_compose: > ports: - 127.0.0.1:8089:8080/tcp > restart: always{code} > > As you can see the "EXTENSION_PRIORITY" env var is set, and according to > start.sh it should be processed to set the appropriate property: > {code:bash} > // ... > # Set extension priority if specified > set_optional_property "extension-priority" "$EXTENSION_PRIORITY" > # Use api-session-timeout if specified. > if [ -n "$API_SESSION_TIMEOUT" ]; then > associate_apisessiontimeout > fi > # Set logback level if specified > if [ -n "$LOGBACK_LEVEL" ]; then > unzip -o -j /opt/guacamole/guacamole.war WEB-INF/classes/logback.xml -d > $GUACAMOLE_HOME > sed -i "s/level=\"info\"/level=\"$LOGBACK_LEVEL\"/" > $GUACAMOLE_HOME/logback.xml > fi > # > # Finally start Guacamole (under Tomcat) > # > start_guacamole{code} > > Nonetheless, the docker logs clearly indicate that the extensions are still > loaded according to filename, ignoring the specified priority: > {noformat} > 01:56:13.581 [localhost-startStop-1] INFO o.a.g.extension.ExtensionModule - > Multiple extensions are installed and will be loaded in order of decreasing > priority: > 01:56:13.581 [localhost-startStop-1] INFO o.a.g.extension.ExtensionModule - - > [openid] "OpenID Authentication Extension" > (/home/guacamole/.guacamole/extensions/1-guacamole-auth-sso-openid-1.4.0.jar) > 01:56:13.581 [localhost-startStop-1] INFO o.a.g.extension.ExtensionModule - - > [mysql] "MySQL Authentication" > (/home/guacamole/.guacamole/extensions/guacamole-auth-jdbc-mysql-1.4.0.jar) > 01:56:13.581 [localhost-startStop-1] INFO o.a.g.extension.ExtensionModule - > To change this order, set the "extension-priority" property or rename the > extension files. The default priority of extensions is dictated by the sort > order of their filenames.{noformat} > > I tried to understand what the issue might be, to be able to submit a patch, > but I am kind of stuck because I don't have a good grasp on the bootstrap > process. I think solving the issue should be relatively simple for anyone > with a better understanding of the codebase. > Thanks. -- This message was sent by Atlassian Jira (v8.20.1#820001)