Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boto_secgroup is using group's Name, not the usual tag:Name - breaking both execution (.run) and state (.instance_present) modules if Name and tag:Name are different #55337

Open
nnsense opened this issue Nov 16, 2019 · 4 comments
Labels
boto AWS wrapper modules Bug broken, incorrect, or confusing behavior Confirmed Salt engineer has confirmed bug/feature - often including a MCVE severity-high 2nd top severity, seen by most users, causes major problems

Comments

@nnsense
Copy link

nnsense commented Nov 16, 2019

Description of Issue

So far, I've seen salt referring to tag:Name in its boto modules. I've had to figure out myself boto_secgroup is actually using the Name, not the usual tag:Name. For consistency, the tag:Name should be used to manage AWS Security groups. This has important consequences because this module is used by boto_ec2.run, which is turn used by boto_ec2.instance_present. Basically if we're trying to use default SG's name in instance_present bith state and module will fail.

This is Checking all Security groups, we see that every security group has a name, and a tag:Name. Usually, these are identical, but with the default group, the Name will be 'default' while the tag:Name will be the one we've defined.

salt-call boto_secgroup.get_all_security_groups

If I try searching for the SG by using the tag name 'SG-NAT' instead of the Name 'default', salt returns nothing.

The following will return 'False' ('SG-NAT' is the tag Name of the default group)

salt-call boto_secgroup.get_group_id 'SG-NAT' vpc_name='VPC-SALT'

This will instead successfully find the group's ID

salt-call boto_secgroup.get_group_id 'default' vpc_name='VPC-SALT'

For consistency with other modules, this module should only use tags.
Or at least this peculiarity should be documented..

Versions Report

Salt Version:
           Salt: 2019.2.2
 
Dependency Versions:
           cffi: 1.6.0
       cherrypy: unknown
       dateutil: 2.8.0
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: 0.31.0
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: Not Installed
      pycparser: 2.14
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.5 (default, Aug  7 2019, 00:51:29)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.3.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.1.4
 
System Versions:
           dist: centos 7.7.1908 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-1062.4.3.el7.x86_64
         system: Linux
        version: CentOS Linux 7.7.1908 Core
@nnsense nnsense changed the title boto_secgroup is using group's Name, not the usual tag:Name boto_secgroup is using group's Name, not the usual tag:Name - breaaking both module (.run) and state (.instance_present) Nov 16, 2019
@nnsense nnsense changed the title boto_secgroup is using group's Name, not the usual tag:Name - breaaking both module (.run) and state (.instance_present) boto_secgroup is using group's Name, not the usual tag:Name - breaaking both module (.run) and state (.instance_present) if Name and tag:Name are different Nov 16, 2019
@nnsense nnsense changed the title boto_secgroup is using group's Name, not the usual tag:Name - breaaking both module (.run) and state (.instance_present) if Name and tag:Name are different boto_secgroup is using group's Name, not the usual tag:Name - breaking both execution (.run) and state (.instance_present) modules if Name and tag:Name are different Nov 20, 2019
@waynew waynew added this to Needs triage in [Test] Triage Dec 12, 2019
@Akm0d Akm0d added v2019.2 unsupported version team-boto and removed needs-triage labels Dec 19, 2019
@Akm0d Akm0d added this to the Approved milestone Dec 19, 2019
@Akm0d Akm0d moved this from Needs triage to Low priority in [Test] Triage Dec 19, 2019
@stale
Copy link

stale bot commented Jan 19, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label Jan 19, 2020
@sagetherage sagetherage added Bug broken, incorrect, or confusing behavior and removed v2019.2 unsupported version stale labels Jan 24, 2020
@sagetherage
Copy link
Contributor

not stale

@sagetherage sagetherage added the Confirmed Salt engineer has confirmed bug/feature - often including a MCVE label Jan 24, 2020
@sagetherage
Copy link
Contributor

I guess I have to write a full dissertation so Stalebot is too botty on the booty of the ticket-y so that I can get this issue to not be STALE. I am not stale. I am not stale.I am not stale.I am not stale.I am not stale.I am not stale.

@sagetherage
Copy link
Contributor

Oh, I took the stale label off, my bad, I wonder what the bot does then?

@sagetherage sagetherage added this to Planning in Sodium Jan 24, 2020
@sagetherage sagetherage removed this from Planning in Sodium May 11, 2020
@sagetherage sagetherage added the boto AWS wrapper modules label May 12, 2021
@sagetherage sagetherage added severity-high 2nd top severity, seen by most users, causes major problems Phosphorus v3005.0 Release code name and version labels Jun 16, 2021
@sagetherage sagetherage modified the milestones: Approved, Phosphorus Jun 18, 2021
@Ch3LL Ch3LL removed the Phosphorus v3005.0 Release code name and version label Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
boto AWS wrapper modules Bug broken, incorrect, or confusing behavior Confirmed Salt engineer has confirmed bug/feature - often including a MCVE severity-high 2nd top severity, seen by most users, causes major problems
Projects
No open projects
Magnesium
  
Awaiting triage
[Test] Triage
  
Low priority
Development

No branches or pull requests

5 participants