Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1101998 - EC2 Security Groups - empty box
EC2 Security Groups - empty box
Status: CLOSED NEXTRELEASE
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Compute Resources - EC2 (Show other bugs)
6.0.3
Unspecified Unspecified
unspecified Severity high (vote)
: Unspecified
: Unused
Assigned To: Dominic Cleal
Kedar Bidarkar
http://projects.theforeman.org/issues...
: Reopened, Triaged
Depends On: 1324615
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-28 06:19 EDT by Martin Korbel
Modified: 2017-09-13 13:15 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-09-13 13:15:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 6535 None None None 2016-04-22 12:41 EDT
Red Hat Product Errata RHBA-2016:1501 normal SHIPPED_LIVE Red Hat Satellite 6.2 Capsule and Server 2016-07-27 08:28:58 EDT

  None (edit)
Description Martin Korbel 2014-05-28 06:19:38 EDT
This is only a issue tracker. I think, this is really important to solve before release.

Description of problem:
I did not find way, how can I get security groups from Amazon EC2. I have got the box for choosing, but the box is empty. I have got tow security groups in EC2.

Version-Release number of selected component (if applicable):
Satellite-6.0.3-RHEL-6-20140521.0

(10:51:01) mkorbel: Dominic: I have next one question, how can I add a security groups into foreman.
(10:54:55) mkorbel: Dominic: When I try create new virtual machine in EC2, I see empty box of  security groups.
(10:55:52) Dominic: mkorbel: it should "just work".. I think there's a VPC dropdown too, so if you're using those you might have to select that first for them to update, otherwise I don't know
Comment 1 RHEL Product and Program Management 2014-05-28 06:25:05 EDT
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.
Comment 3 Dominic Cleal 2014-06-04 12:59:29 EDT
I can't offer any more info, it works for me.
Comment 4 Martin Korbel 2014-06-05 03:06:39 EDT
What is type of account, what  you use? I tested all this stuff on the IAM account, my account has not admin rights.
Comment 5 Dominic Cleal 2014-06-05 03:11:57 EDT
An ordinary account with admin rights, no IAM.
Comment 6 Martin Korbel 2014-06-05 03:18:50 EDT
Maybe this is the point of this problem. I can see or I can create a security groups in the web EC2 console, but I don't see them in Sat6.
Comment 7 Dominic Cleal 2014-07-09 05:57:29 EDT
Created redmine issue http://projects.theforeman.org/issues/6535 from this bug
Comment 8 Tom Caspy 2015-01-11 04:14:48 EST
Tested this under a two conditions:
1. IAM account (in the RedHat EC2 account)
- normal security groups (no VPC) - properly shown
- VPC security groups - properly shown
2. Master account (my personal one)
- normal security groups (no VPC) - properly shown
- VPC security groups - properly shown

This may be caused by the compute resource being under a different region, where the security groups and VPCs are not defined, i.e. using us-east-1 (N. Virginia) but having the EC2 compute resource go to us-west-2 (Oregon) - in which case, a "default" security group should still be shown IMHO.
Comment 9 Tommy McNeely 2015-02-12 13:19:55 EST
I made some comments on the redmine issue. I believe this has to do with the "initial" page load. Upon *changing* the subnet, it loads the security groups, and works fine, but if you setup your "image" exactly how you want it, then come back and try to edit it, you will see that the security groups are blank, and if you submit changes, it submits them blank.

The same thing happens at New Host -> Network... first load is blank, but if you change the subnet, they load and can be selected.

Tommy
Comment 10 Bryan Kearney 2015-08-25 13:23:35 EDT
Upstream bug component is Compute Resources
Comment 11 Bryan Kearney 2015-08-25 13:56:49 EDT
Upstream bug component is Provisioning
Comment 12 Bryan Kearney 2015-08-25 13:58:23 EDT
Upstream bug component is Compute Resources
Comment 13 Bryan Kearney 2016-01-20 10:01:02 EST
Moving to POST since upstream bug http://projects.theforeman.org/issues/6535 has been closed
-------------
Stefan Goethals
The JQuery selector in https://github.com/theforeman/foreman/blob/develop/app/assets/javascripts/compute_resource.js#L195 returns 2 elements.
The following functions don't take that into account and thus the security_groups and subnets variables are never populated.

Changing https://github.com/theforeman/foreman/blob/develop/app/assets/javascripts/compute_resource.js#L196
From
sg_select = $('.security_group_ids') 
To
sg_select = $('select.security_group_ids')

seems to resolve the issue.

-------------
Jordan Snodgrass
Stefan Goethals wrote:
> Changing https://github.com/theforeman/foreman/blob/develop/app/assets/javascripts/compute_resource.js#L196
> From
> sg_select = $('.security_group_ids') 
> To
> sg_select = $('select.security_group_ids')

I've verified that this also fixes my issue #12837 (and probably many other security-group related issues).  Will you be submitting a pull request to get this included in the next release?

-------------
Stefan Goethals
PR https://github.com/theforeman/foreman/pull/3097
-------------
Anonymous
Applied in changeset commit:062f653f53519a4704c31c297da2fca050e1234d.
Comment 16 Kedar Bidarkar 2016-04-04 16:05:24 EDT
Currently we do not have foreman-ec2 Package available for EC2 compute Resource.

TESTED with sat62-snap6
Comment 17 Kedar Bidarkar 2016-04-18 07:14:39 EDT
This issue still persists, 

We have vpc subnet defined for each of Availability zones in us-east-1.

But selecting the VPC subnet from the drop-down and then selecting the Security-Groups and submitting, does  not save the "security Group". This can be observed from editing the compute profile associated with the ec2-Compute Resource. 

Which does not show the SecurityGroup selected above under the selected items.


TESTED with sat62-snap8.1
Comment 24 errata-xmlrpc 2016-07-27 05:09:15 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1501
Comment 26 Bryan Kearney 2016-08-11 10:01:18 EDT
Upstream bug component is Compute Resources - EC2
Comment 27 Bryan Kearney 2017-09-13 13:15:37 EDT
Upstream is showing this as fixed. Ia m closing this out as NEXTRELEASE. If you are still seeing issues on 6.3, please feel free to re-open with additional information.

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