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

security-group show: fix empty response if an API endpoint is misbehaving #660

Merged

Conversation

tgrondier
Copy link
Member

@tgrondier tgrondier commented Jan 6, 2025

Description

exo compute security-group show iterates through all zones to retrieve instances associated with it. If a single API endpoint happened to throw an error, the call itself would error out. This fix allows showing that security group while still showing an error

Checklist

(For exoscale contributors)

  • Changelog updated (under Unreleased block)
  • Testing

Testing

➜  ~/exo/cli git:(tgrondier/sc-114869/exo-c-sh-show-error-in-preprod) ✗ go run . c sg show edc0d129-2f94-4531-920e-7cf798439cd3                                                                                             25-01-06 16:40 
error while listing instances in security group: 1 error occurred:
        * Get "https://ppapi-at-vie-2.exoscale.com/v2/instance": dial tcp: lookup ppapi-at-vie-2.exoscale.com on 127.0.0.53:53: server misbehaving

┼──────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼
│  SECURITY GROUP  │                                                                                                                 │
┼──────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼
│ ID               │ edc0d129-2f94-4531-920e-7cf798439cd3                                                                            │
│ Name             │ default                                                                                                         │
│ Description      │ Default Security Group                                                                                          │
│ Ingress Rules    │                                                                                                                 │
│                  │   08798387-0c7d-4601-a5ed-93367b889314      TCP   0.0.0.0/0   22                                                │
│                  │                                                                                                                 │
│ Egress Rules     │ -                                                                                                               │
│ External Sources │ -                                                                                                               │
│ Instances        │                                                                                                                 │
│                  │   VM-ec365352-f303-4fac-9cad-26e4a63b2227   ec365352-f303-4fac-9cad-26e4a63b2227   159.100.241.234   ch-gva-2   │
│                  │   VM-79e75e58-34c8-4f99-8168-e37722eb97cc   79e75e58-34c8-4f99-8168-e37722eb97cc   85.217.161.242    ch-gva-2   │
│                  │   VM-33e1fdda-d1d4-4fbd-8c7a-4e49971e3975   33e1fdda-d1d4-4fbd-8c7a-4e49971e3975   85.217.161.235    ch-gva-2   │
│                  │                                                                                                                 │
┼──────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼

@tgrondier tgrondier merged commit bb74bd1 into master Jan 9, 2025
1 check passed
@tgrondier tgrondier deleted the tgrondier/sc-114869/exo-c-sh-show-error-in-preprod branch January 9, 2025 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants