Guangya Liu created MESOS-5328:
----------------------------------

             Summary: Docker volume isolator will mount volumes randomly if 
there are multiple volumes for one container
                 Key: MESOS-5328
                 URL: https://issues.apache.org/jira/browse/MESOS-5328
             Project: Mesos
          Issue Type: Bug
            Reporter: Guangya Liu
            Assignee: Guangya Liu


I was writing some test cases and found that sometimes the volume and mount 
point cannot match well when there are multiple volumes for one container.

{code}
  // Create volume with relative path.
  hashmap<string, string> options;
  const string key = "iops";
  const string value = "150";
  options[key] = value;
  const string driver1 = "driver1";
  const string name1 = "name1";
  const string containerPath1 = "tmp/foo1";
  Volume volume1 = createDockerVolume(
      driver1, name1, containerPath1, options);

  // Create volume with absolute path.
  const string driver2 = "driver2";
  const string name2 = "name2";
  // Make sure the absolute path exsit.
  const string containerPath2 = path::join(os::getcwd(), "foo2");
  ASSERT_SOME(os::mkdir(containerPath2));
  Volume volume2 = createDockerVolume(
      driver2, name2, containerPath2);
{code}

During test, I found that sometimes, the {{foo1}} is mount to {{mountpoint2}} 
while {{foo2}} mount to {{mountpoint1}}.

The root cause is that the {{volumes}} in prepare are persisted in a 
{{hashset}} and the {{hashset}} cannot make sure the order.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to