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

Ubuntu 22.04 no longer uses gateway4 for default route entry[BUG] #63009

Open
1 of 9 tasks
shadoutmapes opened this issue Nov 3, 2022 · 6 comments
Open
1 of 9 tasks
Assignees
Labels
Bug broken, incorrect, or confusing behavior Deprecation needs-triage Salt-Cloud ubuntu affects this operating system

Comments

@shadoutmapes
Copy link

shadoutmapes commented Nov 3, 2022

Description
A clear and concise description of what the bug is.
During salt-cloud deploy of ubuntu 22.04 if you use customization it sets the default gatway in netplan config with gateway4: ip address. This is deprecated and needs to be moved to routes statement
Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)
cloud.profiles.d file

ubuntults22deploy:
deploy: True
customization: True
provider: name of provider file that links to our vcenter instance
clonefrom: UbuntuRaw
datacenter: our datacenter
folder: systems
cluster: vcenter cluster
devices:
network:
'Network adapter 1':
dvs_switch: 'VMNetwork'
switch_type: distributed
adapter_type: vmxnet3
subnet_mask: 255.255.255.0
dns_servers:

  • dns server 1
  • dns server 2
    num_cpus: 2
    memory: 8GB
    tags:
    {'Backup': 'Exempt'}
    ssh_username: root
    password:
    minion:
    master: salt master fqdn

This you can use in a map file, so specify it when you deploy

ubuntults22vm:
extends: ubuntults22deploy
Please be as specific as possible and give set-up details.

map file

ubuntults22vm:
testubuntu:
devices:
network:
'Network adapter 1':
name: 'VLANx'
ip: 'x.x.x.x'
subnet_mask: 255.255.255.192
gateway: 'x.xx.x'
domain: "our domain"
minion:
ID: testubuntu

  • on-prem machine
  • VM (Virtualbox, KVM, etc. please specify)
  • VM running on a cloud service, please be explicit and add details
  • container (Kubernetes, Docker, containerd, etc. please specify)
  • or a combination, please be explicit
  • jails if it is FreeBSD
  • classic packaging
  • onedir packaging
  • used bootstrap to install

Steps to Reproduce the behavior
(Include debug logs if possible and relevant)
salt-cloud -m /path_to_above_map_file

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Versions Report

salt --versions-report Salt Version: Salt: 3005.1

Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.7.3
docker-py: Not Installed
gitdb: 2.0.6
gitpython: 3.0.7
Jinja2: 2.10.1
libgit2: 0.28.3
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 0.6.2
msgpack-pure: Not Installed
mysql-python: 1.4.4
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: 3.6.1
pygit2: 1.0.3
Python: 3.8.10 (default, Jun 22 2022, 20:18:18)
python-gnupg: 0.4.5
PyYAML: 5.3.1
PyZMQ: 20.0.0
smmap: 2.0.5
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.2

System Versions:
dist: ubuntu 20.04 focal
locale: utf-8
machine: x86_64
release: 5.4.0-125-generic
system: Linux
version: Ubuntu 20.04 focal

./salt-bootstrap.sh -- Version 2022.10.04

(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)

PASTE HERE

Additional context
Add any other context about the problem here.

@shadoutmapes shadoutmapes added Bug broken, incorrect, or confusing behavior needs-triage labels Nov 3, 2022
@welcome
Copy link

welcome bot commented Nov 3, 2022

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!

@OrangeDog OrangeDog added Salt-Cloud Deprecation ubuntu affects this operating system labels Nov 4, 2022
@shadoutmapes
Copy link
Author

any chance anyone know's a directive inside a map file that allows for static routes?

@itspooya
Copy link
Contributor

itspooya commented Nov 8, 2022

I would like to work on this
@shadoutmapes are you okay with that?

@shadoutmapes
Copy link
Author

Sure, I've looked through the bootstrap script and don't really see where this is defined (python skills are passible but not much more) I think the easiest, and also a feature would be how do we put a static route via a map file? the format is the same other than netplan accepts "default" instead of a network range/ip address in the to: field

@shadoutmapes
Copy link
Author

sshdremove:
file.replace:

  • name: /etc/netplan/99-netcfg-vmware.yaml
  • pattern: 'gateway4.*'
  • repl: ''
    sshdadd:
    file.append:
  • name: /etc/netplan/99-netcfg-vmware.yaml
  • text:
    • ' routes:'
    • ' - to: default'
    • ' via: {{ pillar['vlan'] }}'
      appnetplan:
      cmd.run:
  • name: "netplan apply"

This is a state file I use to fix the issue after the fact

@itspooya
Copy link
Contributor

I think this is related to #57541 and deprecation of net-tools?

@Akm0d Akm0d self-assigned this Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Deprecation needs-triage Salt-Cloud ubuntu affects this operating system
Projects
None yet
Development

No branches or pull requests

4 participants