Bug 42788 - Add tab for handling of software and docker details
Add tab for handling of software and docker details
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center - Self Service
UCS 4.1
Other Linux
: P5 normal (vote)
: ---
Assigned To: Alexander Kläser
Dirk Wiesenthal
:
Depends on: 42943
Blocks: 42635
  Show dependency treegraph
 
Reported: 2016-10-28 16:19 CEST by Alexander Kläser
Modified: 2016-11-25 10:01 CET (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kläser univentionstaff 2016-10-28 16:19:16 CEST
We will need a tab for managing all software details, i.e., Docker configurations and Debian package upload.
Comment 1 Alexander Kläser univentionstaff 2016-10-28 16:19:33 CEST
... a first draft layout has already been implemented.
Comment 2 Alexander Kläser univentionstaff 2016-11-10 12:07:15 CET
TODOs for Debian package upload:
* The list is not sorted and should be refreshed
* Only 500kb are allowed for the upload
* The checkbox for overriding older package versions is not correctly considered 
  by the JavaScript code.
Comment 3 Dirk Wiesenthal univentionstaff 2016-11-13 23:09:16 CET
Is this bug also for the Docker tab? If so, the very first opening of a non-Docker App does not disable the Docker attributes.

"Database Type" does not seem to be considered in the "changes" dict. Neither in the very first save() (where "MySQL" should be sent), nor when changing it from "MySQL" (which in fact is just the first entry in the ComboBox, not the "real value") to "Postgres".
Comment 4 Alexander Kläser univentionstaff 2016-11-14 14:22:11 CET
(In reply to Dirk Wiesenthal from comment #3)
> Is this bug also for the Docker tab? If so, the very first opening of a
> non-Docker App does not disable the Docker attributes.
> 
> "Database Type" does not seem to be considered in the "changes" dict.
> Neither in the very first save() (where "MySQL" should be sent), nor when
> changing it from "MySQL" (which in fact is just the first entry in the
> ComboBox, not the "real value") to "Postgres".

I assume that the checkbox "Use a database" was not checked. There was a bug that the fields were not disabled when "Use a database" was unchecked.
Comment 5 Alexander Kläser univentionstaff 2016-11-14 14:58:03 CET
Layout for docker and software widgets has been committed:

univention-management-console-module-appcenter-selfservice (1.0.0-76):
r74411 | Bug #42788: add widgets + logic for handling software/docker configuration
r74293 | Bug #42788: [WIP] layout for docker widgets
r74275 | Bug #42788: complete layout of software tab
r74179 | Bug #42788: Simplify and integrated PackageUploader
Comment 6 Alexander Kläser univentionstaff 2016-11-14 15:00:42 CET
(In reply to Alexander Kläser from comment #2)
> TODOs for Debian package upload:
> * The list is not sorted and should be refreshed
> * Only 500kb are allowed for the upload
> * The checkbox for overriding older package versions is not correctly
> considered 
>   by the JavaScript code.

This will be done via Bug 42943.

→ RESOLVED for now.
Comment 7 Alexander Kläser univentionstaff 2016-11-15 09:50:23 CET
I forgot to include a few more scripts...

univention-management-console-module-appcenter-selfservice (1.0.0-82):
r74428 | Bug #42788: added infos + text areas for env, schema, ucr, preinst, prerm
Comment 8 Dirk Wiesenthal univentionstaff 2016-11-16 12:22:46 CET
DockerApps have an unhandy default for the init script: /sbin/init.

This works for Package based Docker Apps (DockerImage=appbox), but for many Image based Docker Apps, it does not.

The value needs to be changed to "DockerScriptInit = " in the ini file for these Apps.
Comment 9 Alexander Kläser univentionstaff 2016-11-16 14:56:22 CET
(In reply to Dirk Wiesenthal from comment #8)
> DockerApps have an unhandy default for the init script: /sbin/init.
> 
> This works for Package based Docker Apps (DockerImage=appbox), but for many
> Image based Docker Apps, it does not.
> 
> The value needs to be changed to "DockerScriptInit = " in the ini file for
> these Apps.

Fixed in the frontend. An empty docker_script_init field is now always transmitted as null value to the backend.

@Dirk: You need to adjust the default value to empty.

univention-management-console-module-appcenter-selfservice (1.0.0-96):
r74482 | Bug #42788: make sure that an empty DockerScriptInit field is always set
Comment 10 Dirk Wiesenthal univentionstaff 2016-11-16 15:28:31 CET
Fixed in r74490
Comment 11 Dirk Wiesenthal univentionstaff 2016-11-18 00:40:56 CET
ports_redirection is a list of lists when sent to the backend. Can you please send "$hostport:$containerport" like in docker_volumes?

docker_volumes do not necessarily need a path for the container. In this case, the same path is used for the host and container. (This is due to the fact that we just add "-v $volume" to the docker command)

I think it is okay to require the user to repeat the path even in this case. But currently, the path can be left empty, which results in "$host_path:" which will probably break the docker create command.
Comment 12 Dirk Wiesenthal univentionstaff 2016-11-18 00:42:36 CET
Is it easy to remove the checkbox "Use Database" and instead add a choice in the ComboBox Database Type: ["mysql", "postgres"] -> ["", "mysql", "postgres"]?
Comment 13 Dirk Wiesenthal univentionstaff 2016-11-18 00:48:38 CET
When checking "Use docker" and adding a image name, then saving, a lot of values are passed to the backend.

Including "auto_mod_proxy". By default, this should be True. But False is sent. Reason: The App was a Non-Docker App the moment it was opened. And Non-Docker Apps have auto_mod_proxy = False. So this value was sent to the frontend. But when changing the App to be a Docker App, auto_mod_proxy should be True.

Also, can you add WebInterfaceProxyScheme to the regular Docker Tab (maybe "advanced" pane). Currently, it is under "custom attributes". I think this does not reflect the importance of this attribute.
Comment 14 Dirk Wiesenthal univentionstaff 2016-11-18 00:52:23 CET
I cannot upload a Debian file called kix-pg.deb. The frontend probably parses the filename and rejects it. The backend would be able to handle it. In fact, even kix-pg.tgz can be handled (as long as it was just renamed and is a valid Debian package). Please allow all filenames.
Comment 15 Alexander Kläser univentionstaff 2016-11-18 14:57:32 CET
(In reply to Dirk Wiesenthal from comment #11)
> ports_redirection is a list of lists when sent to the backend. Can you
> please send "$hostport:$containerport" like in docker_volumes?

Fixed.
univention-management-console-module-appcenter-selfservice (1.0.0-113):
r74579 | Bug #42788: adjust handling of ports_redirection
 
> docker_volumes do not necessarily need a path for the container. In this
> case, the same path is used for the host and container. (This is due to the
> fact that we just add "-v $volume" to the docker command)
>
> I think it is okay to require the user to repeat the path even in this case.
> But currently, the path can be left empty, which results in "$host_path:"
> which will probably break the docker create command.

Fixed. The container path is now optional.

univention-management-console-module-appcenter-selfservice (1.0.0-114):
r74580 | Bug #42788: adjust handling of docker_volumes for empty container path

(In reply to Dirk Wiesenthal from comment #12)
> Is it easy to remove the checkbox "Use Database" and instead add a choice in
> the ComboBox Database Type: ["mysql", "postgres"] -> ["", "mysql",
> "postgres"]?

Fixed. The ComboBox has now a field "No Database".

univention-management-console-module-appcenter-selfservice (1.0.0-115):
r74581 | Bug #42788: remove checkbox for database and use ComboBox instead
Comment 16 Alexander Kläser univentionstaff 2016-11-18 19:34:00 CET
(In reply to Dirk Wiesenthal from comment #13)
> When checking "Use docker" and adding a image name, then saving, a lot of
> values are passed to the backend.
> 
> Including "auto_mod_proxy". By default, this should be True. But False is
> sent. Reason: The App was a Non-Docker App the moment it was opened. And
> Non-Docker Apps have auto_mod_proxy = False. So this value was sent to the
> frontend. But when changing the App to be a Docker App, auto_mod_proxy
> should be True.

Fixed. When checking "Use Docker" and the app has not been a Docker app initially, auto_mod_proxy is checked.

univention-management-console-module-appcenter-selfservice (1.0.0-117):
r74587 | Bug #42788: Set auto_mod_proxy initially to true

> Also, can you add WebInterfaceProxyScheme to the regular Docker Tab (maybe
> "advanced" pane). Currently, it is under "custom attributes". I think this
> does not reflect the importance of this attribute.

Fixed.

univention-management-console-module-appcenter-selfservice (1.0.0-117):
r74588 | Bug #42788: Support web_interface_proxy_scheme

(In reply to Dirk Wiesenthal from comment #14)
> I cannot upload a Debian file called kix-pg.deb. The frontend probably
> parses the filename and rejects it. The backend would be able to handle it.
> In fact, even kix-pg.tgz can be handled (as long as it was just renamed and
> is a valid Debian package). Please allow all filenames.

Fixed. The backend parses the file and returns a canonical name as "<packageName>_<version>_<architecture>.deb". Also upon saving or canceling, temporary uploads of the user for this particular app version are cleared.

univention-management-console-module-appcenter-selfservice (1.0.0-117):
r74586 | Bug #42788: Rename uploaded packages to canoncical form + clear uploads
Comment 17 Dirk Wiesenthal univentionstaff 2016-11-18 21:00:29 CET
(In reply to Alexander Kläser from comment #16)
> Fixed. The backend parses the file and returns a canonical name as
> "<packageName>_<version>_<architecture>.deb". Also upon saving or canceling,
> temporary uploads of the user for this particular app version are cleared.
> 

What happens if the module is closed via (X) on the very top bar? What happens when the sessions timeout hits?
Comment 18 Alexander Kläser univentionstaff 2016-11-25 10:01:06 CET
The new version of the App Provider Portal has been released and this bug will thus be closed.