Project

General

Profile

Actions

Bug #7350

open

[Openstack] - security groups are not applied to new host

Added by jan kaufman over 9 years ago. Updated over 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Compute resources - OpenStack
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

when new host is created by GUI it ignores selected security group
example from log:

Adding Compute instance for mdu-ddt569.int.na.XXXXX.com
Cache read: use_shortname_for_vms
  Setting Load (1.1ms)  SELECT "settings".* FROM "settings" WHERE "settings"."name" = 'use_shortname_for_vms' ORDER BY name LIMIT 1
Cache write: use_shortname_for_vms
  KeyPair Load (0.5ms)  SELECT "key_pairs".* FROM "key_pairs" WHERE "key_pairs"."compute_resource_id" = 1 LIMIT 1
creating VM with the following options: {"name"=>"mdu-ddt569.int.na.XXXXX.com", "key_name"=>"foreman-18e75c84a-eb5f-4977-84e3-2dfa8b0bb239", "availability_zone"=>"na.dev", "block_device_mapping"=>[{"device_name"=>"/dev/vda", "volume_size"=>20, "volume_id"=>""}], "flavor_ref"=>"49", "tenant_id"=>"103a49bb861e485ea05aa78f9b0216bd", "security_group"=>"dev-single", "image_ref"=>"4d189653-932d-4fb6-91ca-ec84c3578fb4"}

looking at instance details:
nova list-secgroup 3290efda-d8bd-448e-9765-65e34cf332b2
+----+---------+-------------+
| Id | Name    | Description |
+----+---------+-------------+
| 21 | default | default     |
+----+---------+-------------+

but when host is created by API call (curl) it works as expected.
log file:

creating VM with the following options: {"name"=>"mdu-ddt569-2.int.na.XXXXX.com", "key_name"=>"foreman-18e75c84a-eb5f-4977-84e3-2dfa8b0bb239", "availability_zone"=>"na.dev", "block_device_mapping"=>[{"device_name"=>"/dev/vda", "volume_size"=>20, "volume_id"=>""}], "flavor_ref"=>"49", "image_ref"=>"4d189653-932d-4fb6-91ca-ec84c3578fb4", "security_groups"=>["dev-single"], "tenant_id"=>"103a49bb861e485ea05aa78f9b0216bd"}

the problem is with the security group parameter:
' "security_groups"=>["dev-single"]' vs '"security_group"=>"dev-single"'


Related issues 2 (0 open2 closed)

Has duplicate Foreman - Bug #9281: Compute profile doesn't use selected security group in openstackDuplicate02/08/2015Actions
Has duplicate Foreman - Bug #15857: [Openstack] Security group not saved in Compute ProfilesDuplicate07/27/2016Actions
Actions #1

Updated by Dominic Cleal over 9 years ago

  • Category set to Compute resources - OpenStack
Actions #2

Updated by Dominic Cleal about 9 years ago

  • Has duplicate Bug #9281: Compute profile doesn't use selected security group in openstack added
Actions #3

Updated by The Foreman Bot about 9 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2140 added
  • Pull request deleted ()
Actions #4

Updated by Stephen Benjamin over 8 years ago

  • Status changed from Ready For Testing to New
  • Pull request added
  • Pull request deleted (https://github.com/theforeman/foreman/pull/2140)

I made an attempt in https://github.com/theforeman/foreman/pull/2140, I thought it was a simple fix, but its not and I don't have any time to invest in this soon.

Actions #5

Updated by Ivan Necas over 6 years ago

  • Bugzilla link set to 1357785
Actions #6

Updated by Ivan Necas over 6 years ago

  • Has duplicate Bug #15857: [Openstack] Security group not saved in Compute Profiles added
Actions

Also available in: Atom PDF