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

ci: specify private network for jenkins agent #676

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

m-ildefons
Copy link
Contributor

Explicitly specify the private network for the jenkins agent created in OVH cloud to run the sesdev integration. This should avoid the exception 409 "Multiple possible networks found" when creating the agent VM:

The private network is explicitly set to be the same as the public network.

+ jcs --os-network-public Ext-Net create --cloud openstack --instance-type s1-8 --jenkins-credential storage-automation-for-root-user minimal-opensuse-15.4-x86_64 sesdev-integration_master-19
Connected to jenkins server 2.378
Traceback (most recent call last):
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/bin/jcs", line 8, in <module>
    sys.exit(main())
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/jcs/__init__.py", line 289, in main
    args.func(args)
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/jcs/__init__.py", line 189, in _do_create
    args.os_network_fixed, args.os_network_public, args.os_security_groups)
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/jcs/openst.py", line 45, in os_instance_create
    wait=True, auto_ip=True)
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/openstack/cloud/_utils.py", line 235, in func_wrapper
    return func(*args, **kwargs)
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/openstack/cloud/_compute.py", line 922, in create_server
    server = self.compute.create_server(**kwargs)
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/openstack/compute/v2/_proxy.py", line 652, in create_server
    return self._create(_server.Server, **attrs)
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/openstack/proxy.py", line 581, in _create
    return res.create(self, base_path=base_path)
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/openstack/resource.py", line 1487, in create
    self._translate_response(response, has_body=has_body)
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/openstack/resource.py", line 1254, in _translate_response
    exceptions.raise_from_response(response, error_message=error_message)
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/openstack/exceptions.py", line 235, in raise_from_response
    http_status=http_status, request_id=request_id
openstack.exceptions.ConflictException: ConflictException: 409: Client Error for url: https://compute.de1.cloud.ovh.net/v2.1/68bb3d2bb759469c94d53c072b024f22/servers, Multiple possible networks found, use a Network ID to be more specific.
script returned exit code 1

Signed-off-by: Moritz Röhrich moritz.rohrich@suse.com

@m-ildefons m-ildefons force-pushed the jenkins-agent-private-network branch 17 times, most recently from a2709b3 to 1eea343 Compare December 20, 2022 13:15
Explicitly specify the private network for the jenkins agent created in
OVH cloud to run the sesdev integration. This should avoid the
exception 409 "Multiple possible networks found" when creating the
agent VM:

The private network is explicitly set to be 'fixed'

```
+ jcs --os-network-public Ext-Net create --cloud openstack --instance-type s1-8 --jenkins-credential storage-automation-for-root-user minimal-opensuse-15.4-x86_64 sesdev-integration_master-19
Connected to jenkins server 2.378
Traceback (most recent call last):
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/bin/jcs", line 8, in <module>
    sys.exit(main())
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/jcs/__init__.py", line 289, in main
    args.func(args)
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/jcs/__init__.py", line 189, in _do_create
    args.os_network_fixed, args.os_network_public, args.os_security_groups)
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/jcs/openst.py", line 45, in os_instance_create
    wait=True, auto_ip=True)
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/openstack/cloud/_utils.py", line 235, in func_wrapper
    return func(*args, **kwargs)
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/openstack/cloud/_compute.py", line 922, in create_server
    server = self.compute.create_server(**kwargs)
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/openstack/compute/v2/_proxy.py", line 652, in create_server
    return self._create(_server.Server, **attrs)
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/openstack/proxy.py", line 581, in _create
    return res.create(self, base_path=base_path)
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/openstack/resource.py", line 1487, in create
    self._translate_response(response, has_body=has_body)
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/openstack/resource.py", line 1254, in _translate_response
    exceptions.raise_from_response(response, error_message=error_message)
  File "/tmp/ws/sesdev-integration/master/19/jcs/venv/lib/python3.6/site-packages/openstack/exceptions.py", line 235, in raise_from_response
    http_status=http_status, request_id=request_id
openstack.exceptions.ConflictException: ConflictException: 409: Client Error for url: https://compute.de1.cloud.ovh.net/v2.1/68bb3d2bb759469c94d53c072b024f22/servers, Multiple possible networks found, use a Network ID to be more specific.
script returned exit code 1
```

Depends on: kshtsk/jcs#1

Fix tox workflow:
  - collate linting and testing
  - restrict tox version, fixing package dependency discovery
  - run on ubuntu-20.04 for python 3.6 support

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
@kshtsk
Copy link
Contributor

kshtsk commented Mar 14, 2023

Don't remember why this PR is needed, besides there is no such a network 'fixed' on OVH.

@kshtsk
Copy link
Contributor

kshtsk commented May 3, 2023

Do we still need this?

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.

None yet

2 participants