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

Fix error when /etc/hostname contains a short hostname on Debian #11986

Closed
wants to merge 1 commit into from
Closed

Fix error when /etc/hostname contains a short hostname on Debian #11986

wants to merge 1 commit into from

Conversation

jleroy
Copy link
Contributor

@jleroy jleroy commented Apr 14, 2014

This pull request fix an error which occurs when /etc/hostname contains a short hostname (no domain name) on Debian.

$ cat /etc/hostname
salt-master

Error returned:

          ID: hostname
    Function: network.system
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1371, in call
                  **cdata['kwargs'])
                File "/usr/lib/python2.7/dist-packages/salt/states/network.py", line 380, in system
                  new = __salt__['ip.build_network_settings'](**kwargs)
                File "/usr/lib/python2.7/dist-packages/salt/modules/debian_ip.py", line 1487, in build_network_settings
                  domainname = sline[1]
              IndexError: list index out of range
     Changes:   

I didn't find where to add tests for network module.

@jleroy jleroy closed this Apr 14, 2014
@jleroy jleroy deleted the debian-fix-short-hostname branch April 14, 2014 20:45
@ghost
Copy link

ghost commented Apr 14, 2014

Test PASSed.
Refer to this link for build results: http://jenkins.saltstack.com/job/salt-pr-build/3371/

@jleroy jleroy restored the debian-fix-short-hostname branch April 14, 2014 21:05
@jleroy jleroy deleted the debian-fix-short-hostname branch April 14, 2014 21:06
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.

1 participant