Skip to content

Segfault when adding a Zypper repo on SLES 11.3 #23088

Closed

Description

When adding a Zypper repository on an SUSE Linux Enterprise Server 11 SP3 installation using pkgrepo.managed, a segmentation fault occurs.

Afterwards, the repository is present in the list of Zypper repositories, though.

I am using a masterless minion with salt-call 2014.7.5 (Helium)

Please let me know if you require any additional information.

init.sls:

yasm_repo:
  pkgrepo.managed:
    - baseurl: http://download.opensuse.org/repositories/devel:tools:compiler/SLE_11_SP3/devel:tools:compiler.repo

Run: root@nm-test-3:/srv/salt# salt-call --local state.highstate -l debug

Output:

[DEBUG   ] Reading configuration from /etc/salt/minion
[DEBUG   ] Using cached minion ID from /etc/salt/minion_id: nm-test-3.hostname-removed.de
[DEBUG   ] Configuration file path: /etc/salt/minion
[DEBUG   ] Reading configuration from /etc/salt/minion
[DEBUG   ] Mako not available
[DEBUG   ] Updating roots fileserver cache
[DEBUG   ] Reading configuration from /etc/salt/minion
[INFO    ] Loading fresh modules for state activity
[DEBUG   ] Fetching file from saltenv 'base', ** attempting ** 'salt://top.sls'
[INFO    ] Fetching file from saltenv 'base', ** done ** 'top.sls'
[DEBUG   ] Jinja search path: ['/var/cache/salt/minion/files/base']
[DEBUG   ] Rendered data from file: /var/cache/salt/minion/files/base/top.sls:
base:
  '*':
    - init
[DEBUG   ] Results of YAML rendering:
OrderedDict([('base', OrderedDict([('*', ['init'])]))])
[DEBUG   ] Syncing all
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/modules'
[INFO    ] Syncing modules for environment 'base'
[INFO    ] Loading cache from salt://_modules, for base)
[DEBUG   ] Updating roots fileserver cache
[INFO    ] Caching directory '_modules/' for environment 'base'
[DEBUG   ] Local cache dir: '/var/cache/salt/minion/files/base/_modules'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/states'
[INFO    ] Syncing states for environment 'base'
[INFO    ] Loading cache from salt://_states, for base)
[INFO    ] Caching directory '_states/' for environment 'base'
[DEBUG   ] Local cache dir: '/var/cache/salt/minion/files/base/_states'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/grains'
[INFO    ] Syncing grains for environment 'base'
[INFO    ] Loading cache from salt://_grains, for base)
[INFO    ] Caching directory '_grains/' for environment 'base'
[DEBUG   ] Local cache dir: '/var/cache/salt/minion/files/base/_grains'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/renderers'
[INFO    ] Syncing renderers for environment 'base'
[INFO    ] Loading cache from salt://_renderers, for base)
[INFO    ] Caching directory '_renderers/' for environment 'base'
[DEBUG   ] Local cache dir: '/var/cache/salt/minion/files/base/_renderers'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/returners'
[INFO    ] Syncing returners for environment 'base'
[INFO    ] Loading cache from salt://_returners, for base)
[INFO    ] Caching directory '_returners/' for environment 'base'
[DEBUG   ] Local cache dir: '/var/cache/salt/minion/files/base/_returners'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/outputters'
[INFO    ] Syncing outputters for environment 'base'
[INFO    ] Loading cache from salt://_outputters, for base)
[INFO    ] Caching directory '_outputters/' for environment 'base'
[DEBUG   ] Local cache dir: '/var/cache/salt/minion/files/base/_outputters'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/utils'
[INFO    ] Syncing utils for environment 'base'
[INFO    ] Loading cache from salt://_utils, for base)
[INFO    ] Caching directory '_utils/' for environment 'base'
[DEBUG   ] Local cache dir: '/var/cache/salt/minion/files/base/_utils'
[DEBUG   ] Refreshing modules...
[INFO    ] Loading fresh modules for state activity
[DEBUG   ] Fetching file from saltenv 'base', ** attempting ** 'salt://init.sls'
[INFO    ] Fetching file from saltenv 'base', ** done ** 'init.sls'
[DEBUG   ] Jinja search path: ['/var/cache/salt/minion/files/base']
[DEBUG   ] Rendered data from file: /var/cache/salt/minion/files/base/init.sls:
test_repo:
  pkgrepo.managed:
    - baseurl: http://download.opensuse.org/repositories/devel:tools:compiler/SLE_11_SP3/devel:tools:compiler.repo

[DEBUG   ] Results of YAML rendering:
OrderedDict([('test_repo', OrderedDict([('pkgrepo.managed', [OrderedDict([('baseurl', 'http://download.opensuse.org/repositories/devel:tools:compiler/SLE_11_SP3/devel:tools:compiler.repo')])])]))])
[INFO    ] Running state [test_repo] at time 15:59:44.112326
[INFO    ] Executing state pkgrepo.managed for test_repo
Segmentation fault

Activity

  1. rallytime commented on Apr 28, 2015

    @rallytime
    Contributor

    Thanks for this report and for finding the work around. I think what the best solution here here is probably a simple check in zypper.mod_repo to change baseurl to url if baseurl is passed in from pkgrepo.managed. That way there isn't a strange documentation caveat for zypper in the pkgrepo docs, but we're also maintaining compatibility with the way the module call is used.

  2. added
    bug
    severity-medium
    P4
    on Apr 28, 2015
  3. added this to the Approved milestone on Apr 28, 2015
  4. rallytime commented on Apr 30, 2015

    @rallytime
    Contributor

    @wfhg When you say "I just fixed this issue in the latest stable version" do you mean you submitted a pull request to salt (if so, can you link it here)? Or you just fixed it locally (if this is the case, we'd love to see a pull request)?

  5. rallytime commented on May 21, 2015

    @rallytime
    Contributor

    Great! Thanks for submitting that @wfhg. I've merged your pull request and will be backporting it to the 2015.5 branch. We've internally tagged and started testing 2015.5.1, so this fix won't be in that release, but it will be in 2015.5.2. Would you consider this bug resolved?

  6. added
    fixed-pls-verify
    on May 21, 2015
  7. rallytime commented on May 21, 2015

    @rallytime
    Contributor

    Oh! Also, in the future, please feel free to submit pull requests against the current release branch,if the bug applies there (in this case, 2015.5). Then we'll merge the changes forward into develop. We're happy to backport things, but it's cleaner to do it this way. You can read more about that here, if you like. Thanks again for the fix!

  8. added
    Platform
    on May 26, 2015
  9. ghost closed this as completedon May 27, 2015
  10. rallytime commented on May 27, 2015

    @rallytime
    Contributor

    Sure thing! And thanks for the fix! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4PlatformState-Modulebugfixed-pls-verifyseverity-medium

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions