Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-4693

Variable shadowing in HookManager::slavePreLaunchDockerHook

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.27.0
    • 0.27.2, 0.28.0
    • modules
    • None

    Description

      It looks like the name parameter in HookManager::slavePreLaunchDockerHook is shadowed by the hook name defined in the foreach (const string& name, availableHooks.keys()).

      Due to this, the hook receives its own name as a parameter instead of the container name. It seems to be the only method of HookManager affected by this shadowing.

      See: https://github.com/apache/mesos/blob/0.27.0/src/hook/manager.cpp#L203

      If that's really a bug, I'd be happy to submit a patch.

      Attachments

        Activity

          People

            kdevroede Kevin Devroede
            kdevroede Kevin Devroede
            Kapil Arya Kapil Arya
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: