Bug 36154 - Amazon EC2 AMI selection
Amazon EC2 AMI selection
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Virtual machines (UVMM)
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0
Assigned To: Dirk Wiesenthal
Andreas Peichert
: interim-3
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-11 20:42 CEST by Stefan Gohmann
Modified: 2014-11-26 06:54 CET (History)
2 users (show)

See Also:
What kind of report is it?: ---
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 Stefan Gohmann univentionstaff 2014-10-11 20:42:31 CEST
When I remove the selection 'Only show Univention images', the wizard gets really slow and the usability is not really good.

I think we should move the pre-selection to the connection wizard. Maybe we can define some official EC2 instances and make them selectable. We could also allow the selection among all AMIs. 

If possible, we should include the AMI. Thus it is possible to search with the AMI string.
Comment 1 Erik Damrose univentionstaff 2014-10-22 12:30:24 CEST
Since r54801 the ami-id is included in the list of available images
Comment 2 Stefan Gohmann univentionstaff 2014-10-28 15:25:19 CET
While adding the connection, we should add the following options:
 - Show Univention Corporate Server images
 - Allow AMI search
 - Static preselected AMI list

While adding an instance, a drop-down should be shown with
 - UCS images (if enabled)
 - Static AMI list (if enabled)
 - Search entry (if enabled)

If the search entry was chosen, a popup could be shown and the user can search the instance name / AMI.
Comment 3 Erik Damrose univentionstaff 2014-10-31 19:49:11 CET
r55212 WIP uvmm-daemon
r55213 uvmm-schema: Add attributes to configure image selection filters
Comment 4 Dirk Wiesenthal univentionstaff 2014-11-04 00:44:46 CET
Attributes added. There is no "Search entry (if enabled)", instead the admin can specify a pattern while creating the connection. This pattern is used to filter the AMI list (a "*" will result in the problem described in this bug).

ucs_images=True is not the default anymore. Both options can be changed in UDM only (for now).
Comment 5 Stefan Gohmann univentionstaff 2014-11-04 08:43:36 CET
(In reply to Dirk Wiesenthal from comment #4)
> Attributes added. There is no "Search entry (if enabled)", instead the admin
> can specify a pattern while creating the connection. This pattern is used to
> filter the AMI list (a "*" will result in the problem described in this bug).
> 
> ucs_images=True is not the default anymore. Both options can be changed in
> UDM only (for now).

It looks better, some issues:

* univention-virtual-machine-manager-cloud-ec2 is no build as normal package for UCS 4. Please move it back as app:

root@backup502:~# apt-cache policy univention-virtual-machine-manager-cloud-ec2
univention-virtual-machine-manager-cloud-ec2:
  Installiert:           5.0.1-7.68.201410241634
  Installationskandidat: 5.0.1-7.68.201410241634
  Versionstabelle:
 *** 5.0.1-7.68.201410241634 0
        500 http://192.168.0.10/build2/ ucs_4.0-0/all/ Packages
        100 /var/lib/dpkg/status
     1.0.0-1.1.201410271114 0
        500 http://appcenter.software-univention.de/univention-repository/4.0/maintained/component/ uvmm-ec2/all/ Packages

* Search pattern for AMIs is set to '*' by default. Does that mean that are all images pre-selected by default? If so please remove the '*' and mark this field as optional for the user and explain the user that by default only the UCS images are shown.

* What does "ucs_images=True is not the default anymore?"? If I create a default connection, only the UCS images should be available. If I also add a search pattern like debian, all debian images should be listed as well.

* I'm currently unable to add a new instance via firefox. No instance create wizard is shown: 10.201.50.2
Comment 6 Erik Damrose univentionstaff 2014-11-04 09:43:41 CET
(In reply to Stefan Gohmann from comment #5)
...
> * univention-virtual-machine-manager-cloud-ec2 is no build as normal package
> for UCS 4. Please move it back as app:
> 
> root@backup502:~# apt-cache policy
> univention-virtual-machine-manager-cloud-ec2
> univention-virtual-machine-manager-cloud-ec2:
>   Installiert:           5.0.1-7.68.201410241634
>   Installationskandidat: 5.0.1-7.68.201410241634
>   Versionstabelle:
>  *** 5.0.1-7.68.201410241634 0
>         500 http://192.168.0.10/build2/ ucs_4.0-0/all/ Packages
>         100 /var/lib/dpkg/status
>      1.0.0-1.1.201410271114 0
>         500
> http://appcenter.software-univention.de/univention-repository/4.0/maintained/
> component/ uvmm-ec2/all/ Packages

Seems to be a remnant when that package was part of uvmm-schema. Will be removed with Bug 36253
Comment 7 Dirk Wiesenthal univentionstaff 2014-11-04 14:10:05 CET
There are three non-exclusive filters:

ucs_image: Image is included, if Univention is the owner
preselected_images: Image is included, if ID is in this list
search_pattern: Image is included, if Name, ID, Owner matches the pattern

Only search_pattern is configurable while creating the cloud connection. The other two have to be configured in UDM (and UVMMd needs to be restarted).

By default, ucs_image is True and search_pattern is empty, so that only UCS images are shown.

There is no possibility to search for AMIs in the wizard when creating a new instance (JS filter in the ComboBox aside).
Comment 8 Stefan Gohmann univentionstaff 2014-11-04 17:48:16 CET
The current version looks good:

- OpenStack: * search
- EC: Only UCS images, optional filter
Comment 9 Andreas Peichert univentionstaff 2014-11-06 12:52:37 CET
When I add a ec2 cloud through the wizard, the searchPattern is not mandatory and empty by default. The whole key isn't stored in LDAP, which results in a traceback at a restart of uvmm:

Traceback (most recent call last):
  File "/usr/sbin/univention-virtual-machine-manager-daemon", line 302, in <module>
    for connection in ldap_cloud_connections():
  File "/usr/lib/pymodules/python2.7/univention/uvmm/uvmm_ldap.py", line 234, in ldap_cloud_connections
    c['search_pattern'] = data['univentionVirtualMachineCloudConnectionImageSearchPattern'][0]
KeyError: 'univentionVirtualMachineCloudConnectionImageSearchPattern'

When I manually add a new "UVMM: Cloud Connection" through the LDAP module, a traceback is shown in the frontend:

  File "/usr/lib/pymodules/python2.7/notifier/threads.py", line 82, in _run
    tmp = self._function()
  File "/usr/lib/pymodules/python2.7/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/__init__.py", line 360, in _thread
    dn = module.create( properties, container = options.get( 'container' ), superordinate = options.get( 'superordinate' ) )
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line 184, in wrapper_func
    ret = func( *args, **kwargs )
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line 379, in create
    self._map_properties( obj, ldap_object )
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line 331, in _map_properties
    raise UMC_OptionTypeError( _( 'The property %s has an invalid value: %s' ) % ( property_obj.short_description, str( e ) ) )

UMC_OptionTypeError: The property Show UCS images when creating a new instance has an invalid value: 'int' object has no attribute '__getitem__'
Comment 10 Dirk Wiesenthal univentionstaff 2014-11-06 15:32:41 CET
Hopefully I fixed those two issues in
  univention-virtual-machine-manager-daemon 4.0.17-3.559.201411061329
and
  univention-virtual-machine-manager-schema 5.0.3-3.73.201411061338
Comment 11 Andreas Peichert univentionstaff 2014-11-06 17:19:42 CET
(In reply to Dirk Wiesenthal from comment #10)
> Hopefully I fixed those two issues in
>   univention-virtual-machine-manager-daemon 4.0.17-3.559.201411061329
> and
>   univention-virtual-machine-manager-schema 5.0.3-3.73.201411061338

yes, both work now without a traceback.
Comment 12 Stefan Gohmann univentionstaff 2014-11-26 06:54:40 CET
UCS 4.0-0 has been released:
 http://docs.univention.de/release-notes-4.0-0-en.html
 http://docs.univention.de/release-notes-4.0-0-de.html

If this error occurs again, please use "Clone This Bug".