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

switch-configuration flashing works more consistently on linux #795

Open
sarcasticadmin opened this issue Nov 24, 2024 · 3 comments
Open
Assignees

Comments

@sarcasticadmin
Copy link
Member

Description

Currently being worked on in od_pre22x_01 branch

Problem include:

  • -t being able to be used for IP/Name and not just serial. When used for serial, it does need a switch_spec in some use cases

Fixes include:

  • add a check that marks -l and -t incompatible

Suggested argument combos include:

  • switch_config_loader -c miniconfig -p -t /dev/<tty_device> -u <user> for serial
  • switch_config_loader -l -u <user> for IP

Acceptance Criteria

  • switch_config_loader works in serial and IP scenarios on linux
  • Documentation around the process is updated to reflect actual behavior
@sarcasticadmin
Copy link
Member Author

@davidelang @KN6VKN

@davidelang
Copy link
Collaborator

note, the script requires that it be run as root to be able to ping, but then needs access to the user ssh keys to authenticate. I worked around that by copying my personal key to the root .ssh directory

Also, it requires a hosts entry for every switch mapping to 192.168.255.76

after I did that, I was able to run it and it appears to identify and flash the switches. But it generates some expect errors, see attached switchconfig.log file
switchconfig.log

@davidelang
Copy link
Collaborator

running as dlang no sudo

icmp ping requires root privilege at scripts/Loader.pm line 129.

wihtout the /etc/hosts change
detect_switch returned Expo-Catwalk
Processing Expo-Catwalk as 192.168.255.76 with
Calling (Loader) override_switch for Expo-Catwalk at 192.168.255.76 () with
Looking up switch Expo-Catwalk
get_switchtype called for Expo-Catwalk.
Returning: (Expo-Catwalk, 6, 103, 2001:470:f026:103::200:6, Catwalk, W, 1, Loud, ex4200-48p, 00:26:88:7d:d3:7f)
Got Entry: Expo-Catwalk, 6, 103, 2001:470:f026:103::200:6, Catwalk for Expo-Catwalk
Sending configuration file (output/Expo-Catwalk.conf) to Expo-Catwalk
Initializing SFTP connection to expo-catwalk.scale.lan with user dlang
ssh: Could not resolve hostname expo-catwalk.scale.lan: Name or service not known
SFTP Put output/Expo-Catwalk.conf
Failed to send config to expo-catwalk.scale.lan (Expo-Catwalk)
at ./scripts/switch_config_loader line 268.

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

No branches or pull requests

3 participants