signalfx / maestro-ng

Orchestration of Docker-based, multi-host environments
https://signalfx.com
Apache License 2.0
683 stars 83 forks source link

Confusing message when setting up the limits in YAML file #138

Closed kkebb closed 9 years ago

kkebb commented 9 years ago

Hello again.

So I was setting up a service in my YAML file as follows:

  test:
    image: busybox
    instances:
      bb1:
        ship: boot2docker
        limits:
          memory: 512m
          swap: 256m
          cpu: 1
        command: /bin/sh -c "while true; do echo hello world; sleep 1; done"

and when I started up the service, this is the stack that I see:

#  INSTANCE                                 SERVICE              SHIP                                     CONTAINER                  STATUS    
  1. bb1                                      test                 boot2docker                              failed to start container! failed!
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/deployer/__main__.py", line 259, in main
    getattr(d, options.command)(**vars(options))
  File "/usr/lib/python2.7/site-packages/deployer/deployer.py", line 163, in restart
    concurrency, step_delay, stop_start_delay, reuse, **kwargs)
  File "/usr/lib/python2.7/site-packages/maestro/maestro.py", line 364, in restart
    stop_start_delay, reuse, only_if_changed))
  File "/usr/lib/python2.7/site-packages/maestro/maestro.py", line 261, in _audit_play
    exceptions.raise_with_tb()
  File "/usr/lib/python2.7/site-packages/maestro/maestro.py", line 249, in _audit_play
    play.run()
  File "/usr/lib/python2.7/site-packages/maestro/plays/__init__.py", line 146, in run
    self._end()
  File "/usr/lib/python2.7/site-packages/maestro/plays/__init__.py", line 138, in _end
    exceptions.raise_with_tb(self._error)
  File "/usr/lib/python2.7/site-packages/maestro/plays/__init__.py", line 95, in act
    task.run()
  File "/usr/lib/python2.7/site-packages/maestro/plays/tasks.py", line 330, in run
    False, self._reuse).run()
  File "/usr/lib/python2.7/site-packages/maestro/plays/tasks.py", line 130, in run
    result = self._create_and_start_container()
  File "/usr/lib/python2.7/site-packages/maestro/plays/tasks.py", line 201, in _create_and_start_container
    command=self.container.command)
  File "/usr/lib/python2.7/site-packages/docker/client.py", line 463, in create_container
    return self.create_container_from_config(config, name)
  File "/usr/lib/python2.7/site-packages/docker/client.py", line 471, in create_container_from_config
    return self._result(res, True)
  File "/usr/lib/python2.7/site-packages/docker/client.py", line 123, in _result
    self._raise_for_status(response)
  File "/usr/lib/python2.7/site-packages/docker/client.py", line 119, in _raise_for_status
    raise errors.APIError(e, response, explanation=explanation)
APIError: 500 Server Error: Internal Server Error ("Minimum memoryswap limit should be larger than memory limit, see usage.")

Your efforts are much appreciated.

kkebb commented 9 years ago

Oops! this was meant for docker github

mpetazzoni commented 9 years ago

Thanks!