Coder Social home page Coder Social logo

alibaba / pouch Goto Github PK

View Code? Open in Web Editor NEW
4.6K 265.0 946.0 25.38 MB

An Efficient Enterprise-class Container Engine

Home Page: https://pouchcontainer.io

License: Apache License 2.0

Makefile 0.47% Go 95.76% Shell 3.69% Dockerfile 0.04% Starlark 0.04%
containers oci security efficiency package cloud-native isolation go kubernetes

pouch's Issues

[feature-request] Support Prometheus in Pouch

Issue Description
Prometheus has been very popular in the container ecosystem. And it is also a project in cncf.
We have a feature request to support Prometheus in native Pouch.

Describe what happened:
Support Prometheus in native Pouch

Describe what you expected to happen:
Support Prometheus in native Pouch

How to reproduce it (as minimally and precisely as possible):
NONE

Anything else we need to know?:
NONE

Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

[bug report] Docker image is not supported in pouch.

Issue Description
[bug report] Docker image is not supported in pouch.

Describe what happened:
Failed to start a container created by a docker image.

Describe what you expected to happen:
Succeed to start a container created by a docker image.

How to reproduce it (as minimally and precisely as possible):

  1. Install a ubuntu 14.04.5 host.
    2.Install containerd.
    wget https://github.com/containerd/containerd/releases/download/v1.0.0-beta.3/containerd-1.0.0-beta.3.linux-amd64.tar.gz
    tar xf containerd-1.0.0-beta.3.linux-amd64.tar.gz && cp bin/* /usr/local/bin/
    3.git clone https://github.com/alibaba/pouch.git && cd pouch && docker build -t pouch:test . && docker run -ti -v pwd:/go/src/github.com/alibaba/pouch/ pouch:test bash -c "make build" && cp pouch pouchd /usr/local/bin/
    4.Run "pouchd" command.
    5.In another terminal, run the following commands.
    root@p1:# pouch create ubuntu:16.04
    container's id: fac36f045ed08fc2f970f8a95a530683a66d84df65dcab082a8d2a7e09dbcc62, name: fac36f
    root@p1:
    # pouch start fac36f045ed08fc2f970f8a95a530683a66d84df65dcab082a8d2a7e09dbcc62
    failed to start container fac36f045ed08fc2f970f8a95a530683a66d84df65dcab082a8d2a7e09dbcc62: Image not found

Anything else we need to know?:
NA

Environment:
root@p1:# pouch version
GitCommit:
GoVersion: go1.8.3
KernelVersion:
Os: linux
Version: 0.1.0-dev
APIVersion: vx.y.z
Arch: amd64
BuildTime: 2017-11-09T10:34:25.190579313+08:00
root@p1:
# cat /etc/os-release
NAME="Ubuntu"
VERSION="14.04.5 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.5 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
root@p1:# uname -a
Linux p1 4.4.0-31-generic #50
14.04.1-Ubuntu SMP Wed Jul 13 01:07:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

[enhancement request] volume management implementation

Issue Description

We need to polish volume management in pouch, in API side, daemon side, client side, cli side, doc side and test side. Please record in this issue if some parts are finished.

In every aspect, if finished, please add a reference to the corresponding PR.

plugin developer guidance

  • [] document: volume plugin developer guidance

volume create

  • volume create
    • API design in swagger: #15
    • daemon side implement: #15
    • client side implement: #15
    • cli implement: #15
    • test:

volume list

  • volume list
    • API design in swagger: #578
    • daemon side implement: #578
    • client side implement: #578
    • cli implement: #578
    • test: #578

volume rm

  • volume rm
    • API design in swagger: #498
    • daemon side implement: #15
    • client side implement: #15
    • cli implement: #15
    • test:

volume inspect

  • volume inspect
    • API design in swagger: #498
    • daemon side implement: #498
    • client side implement: #578
    • cli implement:#578
    • test: #585

comment on exported type Image should be of the form "Image ..."

cd /go/src/github.com/alibaba/pouch && make check
fmt
lint
apis/types/image_info.go:3:1: comment on exported type Image should be of the form "Image ..." (with optional leading article)
Makefile:36: recipe for target 'lint' failed
make: *** [lint] Error 1

suggestion:
old:// image info
new:// Image info

How to support runv in Pouch?

Issue Description
I wish to support runv in Pouch, while I have no guidance about this.

Describe what happened:

Describe what you expected to happen:
I wish to support runv in Pouch, while I have no guidance about this.

How to reproduce it (as minimally and precisely as possible):
NONE

Anything else we need to know?:
NONE

Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

[bug] golang version 1.8.3 needs updated in .travis.yml

Issue Description
We have decided to use golang 1.9.1 instead of 1.8.3. We have updated this version in #86 for Dockerfile.

And we need to update .travis.yml:


dist: trusty
sudo: required

language: go
go:
  - 1.8.3
    
go_import_path: github.com/alibaba/pouch

before_install:
  - sudo apt-get update -qq
  - sudo apt-get install -y -qq autoconf automake

script:
  - cd ${TRAVIS_BUILD_DIR}
  - sudo hack/make.sh 

Please help to fix up to keep consistent. Thanks a lot.

/cc @sunyuan3

[help wanted]How to successfully get a full list of prometheus-formatted metrics

Issue Description
https://github.com/alibaba/pouch/blob/master/docs/pouch_with_prometheus.md#how-to-use
When I use the above way, I think the default port is 4243, but after running pouchd the port 4243 isn't being used.

Then I search the way to run pouchd with the specific port. Nothing gained.

I can't find the command line flags to specify port.

And no configuration files to change port.

So, I can't get a full list of prometheus-formatted metrics by curl http://127.0.0.1:4243/metrics

[feature request] need CMD "pouch rm [-f]"

Issue Description
Need to add CMD: pouch rm [-f]

Describe what happened:

Describe what you expected to happen:

How to reproduce it (as minimally and precisely as possible):
1.
2.
3.

Anything else we need to know?:

Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

[bug] usage of "pouch volume rm" should be changed

Issue Description
The usage of pouch volume remove is as following:

#pouch volume remove
Error: requires at least 1 arg(s), only received 0
Usage:
  pouch volume remove [volume] [flags]

Aliases:
  remove, rm

Flags:
  -h, --help   help for remove

According to this usage, [volume] is not mandatory,but actually it is.
The usage could be changed to:

Usage:
  pouch volume remove <volume name> [flags]

Describe what happened:

Describe what you expected to happen:
Usage format could refer to this:
https://stackoverflow.com/questions/9725675/is-there-a-standard-format-for-command-line-shell-help-text

How to reproduce it (as minimally and precisely as possible):
1.
2.
3.

Anything else we need to know?:

Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

[proposal] More detailed Architecture design on github

Issue Description

There should be a page on github about detailed architecture design. It should express exactly the following thing in the architecture.

  1. The overall architecture of Pouch
  2. relationship between k8s and pouch
  3. relationship between pouch and containerd
  4. the plugin policy in Pouch
  5. the control plane and data plane of container management.
  6. the components in Pouch.

[feature request] support `pouchd --version` command line

Issue Description
Currently I failed to execute pouchd --version with error message:

root@ubuntu:~/go/src/github.com/alibaba/pouch# ./pouchd --version
Error: unknown flag: --version
Usage:
   [flags]

Flags:
  -c, --containerd string          where does containerd listened on (default "/var/run/containerd.sock")
      --containerd-config string   Specify the path of Containerd binary (default "/etc/containerd/config.toml")
      --containerd-path string     Specify the path of Containerd binary (default "/usr/local/bin/containerd")
  -D, --debug                      switch debug level
  -h, --help                       help for this command
      --home-dir string            The pouchd's home directory (default "/etc/pouchd")
  -l, --listen stringArray         which address to listen on (default [unix:///var/run/pouchd.sock])

root@ubuntu:~/go/src/github.com/alibaba/pouch# ./pouchd version
ERRO[2017-11-03 14:54:28.002306216] failed to new containerd's client: failed to connect containerd: failed to dial "/var/run/containerd.sock": dial unix /var/run/containerd.sock: connect: connection refused
INFO[0000] starting containerd                           module=containerd revision=20c621178a5f45938e71afad24df281002aac329 version=v1.0.0-beta.1
INFO[0000] setting subreaper...                          module=containerd
INFO[0000] loading plugin "io.containerd.content.v1.content"...  module=containerd type=io.containerd.content.v1
INFO[0000] loading plugin "io.containerd.metadata.v1.bolt"...  module=containerd type=io.containerd.metadata.v1
ERRO[2017-11-03 14:54:28.010396816] failed to wait process: /usr/local/bin/containerd, signal: killed
WARN[2017-11-03 14:54:28.010530606] process: /usr/local/bin/containerd exited
Error: failed to new daemon
Usage:
   [flags]

Flags:
  -c, --containerd string          where does containerd listened on (default "/var/run/containerd.sock")
      --containerd-config string   Specify the path of Containerd binary (default "/etc/containerd/config.toml")
      --containerd-path string     Specify the path of Containerd binary (default "/usr/local/bin/containerd")
  -D, --debug                      switch debug level
  -h, --help                       help for this command
      --home-dir string            The pouchd's home directory (default "/etc/pouchd")
  -l, --listen stringArray         which address to listen on (default [unix:///var/run/pouchd.sock])

We still missing this part.

Describe what happened:
failed to execute pouchd --version

Describe what you expected to happen:
pouchd --version works to return version info of pouchd

How to reproduce it (as minimally and precisely as possible):

  1. install pouch
  2. execute pouchd version

Anything else we need to know?:
NONE

Environment:

  • pouch version (use pouch version): NONE
  • OS (e.g. from /etc/os-release): Ubuntu 16.04.3 LTS
  • Kernel (e.g. uname -a): Linux ubuntu 4.4.0-97-generic #120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools: NONE
  • Others: NONE

[feature request] move API struct generated by swagger to independant directories

Issue Description

Currently pouch uses swagger to generate API structs, and this way indeed helps this project a lot.
While now the API structs are all in one directory apis/types, which seems to be a little bit messy. Swagger will definitely grow rapidly when the developing work goes on, so that the struct files organization will become much more weird and uncomfortable. There is the current status:

2017-11-16 1 35 20

We need use a way to generate swagger struct with more structured looking, for example:

apis
  /types
      /containers
          container_config.go
          container_info.go
          ....
      /images
          image_info.go
          image_summary.go
          ....
      /networks
      /systems
      /volume
           volume_list_resp.go
           volume_info.go

[bug] exit code are not non-zero when executing `pouchd asafgh`

Issue Description

When I execute a pouchd sfghj command which is definitely oncorrect, we should return a non-zero exit code.

In addition, when pouchd returns an error, the log message will show the pouchd cli usage which seems to be unreasonable, we need to remove that.

Describe what happened:

root@ubuntu:~/go/src/github.com/alibaba/pouch# ./pouchd asdfghj
INFO[0000] starting containerd                           module=containerd revision=2b8ed96d2a422bf205adcdfa05272dc12c81613b version=v1.0.0-beta.3
INFO[0000] setting subreaper...                          module=containerd
INFO[0000] loading plugin "io.containerd.content.v1.content"...  module=containerd type=io.containerd.content.v1
INFO[0000] loading plugin "io.containerd.snapshotter.v1.btrfs"...  module=containerd type=io.containerd.snapshotter.v1
WARN[0000] failed to load plugin io.containerd.snapshotter.v1.btrfs  error="path /etc/pouchd/containerd/root/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter" module=containerd
INFO[0000] loading plugin "io.containerd.snapshotter.v1.overlayfs"...  module=containerd type=io.containerd.snapshotter.v1
INFO[0000] loading plugin "io.containerd.metadata.v1.bolt"...  module=containerd type=io.containerd.metadata.v1
WARN[0000] could not use snapshotter btrfs in metadata plugin  error="path /etc/pouchd/containerd/root/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter" module="containerd/io.containerd.metadata.v1.bolt"

You see a unknown executing command, start to executing daemon which is unreasonable.

Below is that we get pouchd cli usage when error happens.

root@ubuntu:~/go/src/github.com/alibaba/pouch# ./pouchd -l fghjkl
INFO[0000] starting containerd                           module=containerd revision=2b8ed96d2a422bf205adcdfa05272dc12c81613b version=v1.0.0-beta.3
INFO[0000] setting subreaper...                          module=containerd
.......................
8e4ad4640e1ee7e37c86c74abc28b0a8d4f0a
ERRO[2017-11-16 16:25:29.237285917] failed to wait process: /usr/local/bin/containerd, signal: killed
WARN[2017-11-16 16:25:29.237849931] process: /usr/local/bin/containerd exited
Error: invalid listening address: fghjkl
Usage:
  pouchd [flags]

Flags:
  -c, --containerd string          where does containerd listened on (default "/var/run/containerd.sock")
      --containerd-config string   Specify the path of Containerd binary (default "/etc/containerd/config.toml")
      --containerd-path string     Specify the path of Containerd binary (default "/usr/local/bin/containerd")
  -D, --debug                      switch debug level
  -h, --help                       help for pouchd
      --home-dir string            The pouchd's home directory (default "/etc/pouchd")
  -l, --listen stringArray         which address to listen on (default [unix:///var/run/pouchd.sock])
      --tlscacert string           Specify CA file of tls
      --tlscert string             Specify cert file of tls
      --tlskey string              Specify key file of tls
      --tlsverify                  Switch if verify the remote when using tls

Describe what you expected to happen:

root@ubuntu:~/go/src/github.com/alibaba/pouch# ./pouchd asdfghj
Error: unknown command "asdfghj" for "pouchd"
Usage:
  pouchd [flags]

Flags:
  -c, --containerd string          where does containerd listened on (default "/var/run/containerd.sock")
      --containerd-config string   Specify the path of Containerd binary (default "/etc/containerd/config.toml")
      --containerd-path string     Specify the path of Containerd binary (default "/usr/local/bin/containerd")
  -D, --debug                      switch debug level
  -h, --help                       help for pouchd
      --home-dir string            The pouchd's home directory (default "/etc/pouchd")
  -l, --listen stringArray         which address to listen on (default [unix:///var/run/pouchd.sock])
      --tlscacert string           Specify CA file of tls
      --tlscert string             Specify cert file of tls
      --tlskey string              Specify key file of tls
      --tlsverify                  Switch if verify the remote when using tls

root@ubuntu:~/go/src/github.com/alibaba/pouch# echo $?
1

How to reproduce it (as minimally and precisely as possible):

  1. execute pouchd asdfghj
  2. see the output

Anything else we need to know?:
NONE

Environment:

  • pouch version (use pouch version): 0.1.0-dev
  • OS (e.g. from /etc/os-release): Ubuntu 16.04.3 LTS \n \l
  • Kernel (e.g. uname -a): Linux ubuntu 4.4.0-98-generic #121-Ubuntu SMP Tue Oct 10 14:24:03 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools: none
  • Others: none

[bug report] /images/json API isn't compatible with Moby

Issue Description
In the existing API of Pouch, /images/json API isn't compatible with Moby.
File https://github.com/alibaba/pouch/blob/master/apis/types/image_info.go is redundant, and should use https://github.com/alibaba/pouch/blob/master/apis/types/image_summary.go.

Pouch used containerd 1.0.0, and image details are from containerd side. https://github.com/alibaba/pouch/blob/master/apis/types/image_info.go is for containerd, while I think we need to transform that into Moby's API.

Discussed with @Ace-Tang offline, this needs updated. Maybe we can refer to moby/moby#34895, since this PR merged containerd 1.0.0 with moby.

Describe what happened:
NONE

Describe what you expected to happen:
NONE

How to reproduce it (as minimally and precisely as possible):
NONE

Anything else we need to know?:
NONE

Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

What is the roadmap of Pouch?

Hi, All,

I think Pouch does need a ROADMAP for the long term. It could help users to understand Pouch much better. In addition, it would guide daily work of the community very well to move closer to the target.

[bug] usage of "pouch volume create" is not right

Issue Description
The usage of "pouch volume create" is incorrect.

Describe what happened:

#pouch volume create -h
Create a pouch volume

Usage:
  pouch volume create [args] NAME [flags]

<snip>

Describe what you expected to happen:
According to the usage, the following CMD should succeed:

#pouch volume create -d local volume-1
ERRO[0000] boltdb: put key: : key required

But "--name" is required:

#pouch volume create --name=volume-2
Scope:
CreatedAt:
Driver:       local
Mountpoint:
Name:         volume-2

How to reproduce it (as minimally and precisely as possible):
1.
2.
3.

Anything else we need to know?:

Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

[feature request] support context in client package between client and daemon side

Issue Description

Currently, I found that in package client there is no context guaranteed. So if some special config in client side cannot be transferred to daemon side beyond RESTful APIs. In addition, context binding can make daemon side know the interrupt of client side. For example, within a time-costing request from client to daemon, if user interrupt this request in client side, the better way to act to this in daemon side is getting aware of this action and stopped the following work. And this will avoid some unnecessary cost in daemon side and be consistent with the client side.

This can be done within built-in package context in golang runtime.

Since you did a lot of work in client package, would you help to solve this?
While I would set this as a mid-term target with priority/p2.

[bug report]pouch client doesn't use tcp connection

Issue Description
when i run pouch client with flag -H tcp://127.0.0.1:5678, it actually connect pouchd via unix socket instead of using tcp address.

Describe what happened:

Describe what you expected to happen:
connect pouchd via tcp connection and because the tcp address i specified isn't correct, it should complaint about connect refused error.

How to reproduce it (as minimally and precisely as possible):
1.just type in command ./pouch -H tcp://127.0.0.1:5678 version, it will response without error when pouchd is started and listen on unix:///var/run/pouchd.sock
2.
3.

Anything else we need to know?:

Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

[feature request] support Installing pouch on various distributions

Issue Description
support Installing pouch on various distributions

Describe what happened:
NONE

Describe what you expected to happen:

How to reproduce it (as minimally and precisely as possible):
NONE

Anything else we need to know?:
NONE

Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

Rich container implementation

Issue Description
Rich container is a very valuable feature of container technology. With the popular docker's concept, we should always run a single process or application in one single container. It seems to simplify process management in container. However it would affect application itself. This would be somewhat invasive to application which is definitely not a good way.

While rich container is one kind of container which could bear other system service running in container to help application run with whatever it wants. More specifically, we construct a system init process in the initialization of container.

Describe what happened:
Currently one single process or application in the only way suggested.

Describe what you expected to happen:
Rich container can be implemented in Pouch.

[feature request] implement disk quota in pouch

Issue Description

Disk quota is really important in container ecosystem. Without disk quota, container service can not guarantee the multi-tenant. A container created on host will violate the other user's disk usage which seems totally unreasonable.

As a result, disk quota is really important in container technology, we had better to implement disk quota in pouch.

[test] pouch testing subtasks

Issue Description
This issue is to track the progress of pouch testing tasks.

Describe what happened:
None
Describe what you expected to happen:
None
How to reproduce it (as minimally and precisely as possible):
None
Anything else we need to know?:
No
Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

[bug] pouch create should check the valid of image

Issue Description
When create a container using "pouch create", it should check if the image specified existed.
If not, an error is expected.

Describe what happened:

Describe what you expected to happen:

How to reproduce it (as minimally and precisely as possible):
#./pouch images
IMAGE ID IMAGE NAME SIZE
68effe31a4ae reg.docker.alibaba-inc.com/base/busybox:latest 527

#./pouch create busybox
INFO[2017-11-14 18:08:00.750619593] Calling POST /containers/create, client @
container's id: c73f484d33055bad722a3628817d51640991bf3b91de9920481ae8bbb8cc4775, name: c73f48

[[email protected] /home/sit/letty/src/github.com/alibaba/pouch]
#ls /etc/pouchd/containers/
18f5fcef8ab38c620cb1b580207e2815f9d7699a6b0421986b80b009d60fcd74 d107b968b8fcba81950f82f999aa4f1ead4d86727a95077f69a4f73879a373d9
c73f484d33055bad722a3628817d51640991bf3b91de9920481ae8bbb8cc4775

[[email protected] /home/sit/letty/src/github.com/alibaba/pouch]
#./pouch start c73f48
INFO[2017-11-14 18:08:16.371527369] Calling POST /containers/c73f48/start, client @
INFO[2017-11-14 18:08:16.371961585] start to subscribe io, backend: raw-file, id: c73f484d33055bad722a3628817d51640991bf3b91de9920481ae8bbb8cc4775
INFO[2017-11-14 18:08:16.372999071] close containerio backend: raw-file, id: c73f484d33055bad722a3628817d51640991bf3b91de9920481ae8bbb8cc4775
INFO[2017-11-14 18:08:16.373029703] close containerio backend: raw-file, id: c73f484d33055bad722a3628817d51640991bf3b91de9920481ae8bbb8cc4775
INFO[2017-11-14 18:08:16.373099901] finished to subscribe io, backend: raw-file, id: c73f484d33055bad722a3628817d51640991bf3b91de9920481ae8bbb8cc4775
ERRO[2017-11-14 18:08:16.412932700] invoke /containers/c73f48/start error Image not found. client @
failed to start container c73f48: Image not found

Anything else we need to know?:

Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

[Proposal] More details in HTTP response status code

Issue Description
I found that in current implementation when daemon succeeds in handling request, it returns StatusOK, otherwise a StatusInternalServerError returned.

I think this is OK, but not so sufficient. HTTP status code can tell user what happened exactly in the daemon side. For example, 200 OK, 201 Created, 401 Bad Request, 404 Not Found, and so on...

So I wish we could do more specific designing on API to make pouch more user-friendly.

In addition, specific status code is necessary, for user maybe we should deliver more messages. For example, treating 400, we should tell users that which field is in bad format rather than just return status code of 400.

Need more input from you, @skoo87 @Ace-Tang @yyb196 @rudyfly . WDYT?

Describe what happened:
More specific status code from API.

Describe what you expected to happen:
More specific status code from API.

How to reproduce it (as minimally and precisely as possible):
NONE

Anything else we need to know?:
Maybe we can learn from Moby's API.

[bug] pouch stop print ERRO msg

Issue Description
CMD "pouch stop $container", prints ERRO msg as following:

ERRO[3464] stat cgroup 4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300  error=""/sys/fs/cgroup/cpuacct/default/4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300/cpuacct.stat" is expected to have 4 fields"*

Describe what happened:

Describe what you expected to happen:

How to reproduce it (as minimally and precisely as possible):

#./pouch create reg.docker.alibaba-inc.com/base/busybox:latest ls /tmp
INFO[2017-11-14 18:31:09.027715378] Calling POST /containers/create, client @
container's id: 4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300, name: 4d27d1

#./pouch start 4d27d1
INFO[2017-11-14 18:31:18.145500039] Calling POST /containers/4d27d1/start, client @
INFO[2017-11-14 18:31:18.145910238] start to subscribe io, backend: raw-file, id: 4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300
INFO[2017-11-14 18:31:18.146477492] success to get image: reg.docker.alibaba-inc.com/base/busybox:latest, container id: 4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300
INFO[2017-11-14 18:31:18.333516402] success to new container: 4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300
INFO[3382] shim containerd-shim started                  address="/containerd-shim/default/4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300/shim.sock" debug=false module="containerd/tasks" pid=94331
INFO[2017-11-14 18:31:18.427115147] success to new task, container id: 4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300, pid: 94354
INFO[2017-11-14 18:31:18.444445342] success to start task, container id: 4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300
INFO[2017-11-14 18:31:18.444479200] success to add container, id: 4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300

#find /sys/fs/cgroup/ -name 4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300*
/sys/fs/cgroup/hugetlb/default/4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300
/sys/fs/cgroup/freezer/default/4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300
/sys/fs/cgroup/blkio/default/4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300
/sys/fs/cgroup/net_cls/default/4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300
/sys/fs/cgroup/memory/default/4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300
/sys/fs/cgroup/perf_event/default/4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300
/sys/fs/cgroup/devices/default/4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300
/sys/fs/cgroup/cpuset,cpu,cpuacct/default/4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300
/sys/fs/cgroup/systemd/default/4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300

#cat /sys/fs/cgroup/cpuset,cpu,cpuacct/default/4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300/cpuset.cpus
0-23

#./pouch stop 4d27d1
INFO[2017-11-14 18:32:34.802486593] Calling POST /containers/4d27d1/stop, client @
INFO[2017-11-14 18:32:39.838560033] the task has quit, id: 4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300, err: <nil>, exitcode: 137, time: 2017-11-14 10:32:39.838088813 +0000 UTC
**ERRO[3464] stat cgroup 4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300  error=""/sys/fs/cgroup/cpuacct/default/4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300/cpuacct.stat" is expected to have 4 fields"**
INFO[3464] shim reaped                                   id=4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300 module="containerd/tasks"
INFO[2017-11-14 18:32:40.000468282] close containerio backend: raw-file, id: 4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300
INFO[2017-11-14 18:32:40.000501512] close containerio backend: raw-file, id: 4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300
INFO[2017-11-14 18:32:40.000567380] finished to subscribe io, backend: raw-file, id: 4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300
INFO[2017-11-14 18:32:40.052767852] success to destroy container: 4d27d1f95287ce83f2f08dd916602f25d40e2b685ec54011b5352fb8faedf300
INFO[2017-11-14 18:32:40.052802535] End of Calling POST /containers/4d27d1/stop, costs 5250 ms. client @

Anything else we need to know?:

Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

pouch run with docker image

containerd manage its own images

$ sudo ctr images ls
[sudo] password for ace: 
REF                              TYPE                                                      DIGEST                                                                  SIZE      PLATFORM                                                                                              LABELS 
docker.io/library/busybox:latest application/vnd.docker.distribution.manifest.list.v2+json sha256:3e8fa85ddfef1af9ca85a5cfb714148956984e02f00bec3f7f49d3925a91e0e7 703.0 KiB linux/386,linux/amd64,linux/arm/v5,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x -    

since docker manages its images

REPOSITORY                                    TAG                 IMAGE ID            CREATED             SIZE
scratch                                       latest              dfd3fa885324        10 days ago         0 B
test-xcb                                      latest              dfd3fa885324        10 days ago         0 B
t4                                            latest              68b68588f46c        11 days ago         1.13 MB
t3                                            latest              019476dd677d        11 days ago         1.13 MB
t2                                            latest              7b1e9ccd80e3        11 days ago         1.13 MB
<none>                                        <none>              caa89e4baff5        11 days ago         1.13 MB
test-1                                        latest              ea9e91634cd6        2 weeks ago         1.13 MB
skopeobuildimage                              latest              4d399c4a319a        3 weeks ago         622 MB

should we make pouch run with docker image.

tell me if I miss something, thanks

Question about the Additional Feature of Pouch: Strong Isolation

Issue Description

There is one additional feature of Pouch in the faq.md:

  • strong isolation: Pouch can create a VM with hypervisor technology via runV and clearcontainer

AFAIK, runV(with Frakti) and clear containers are OCI-compatible and CRI-O-compatible, then they could work seamlessly with both Docker and Kubernetes.

Then why does Pouch list it as a additional feature compared to Docker? Or is it a comparison between Pouch and native Docker without runV/clearcontainers?

I'd appreciate it.

Describe what happened:

Nothing

Describe what you expected to happen:

Nothing

How to reproduce it (as minimally and precisely as possible):

Nothing

Anything else we need to know?:

Nothing

[bug]The swagger spec at "swagger.yml" is invalid against swagger specification 2.0

Issue Description

The swagger spec at "swagger.yml" is invalid against swagger specification 2.0
- definitions.ContainerConfig.properties.Cmd in body must be of type array
- definitions.ContainerConfig.properties.Entrypoint in body must be of type array

How to reproduce it (as minimally and precisely as possible):

cd apis
swagger validate swagger.yml

[help wanted] or [doc request] How to run a container successfully from the begining?

Issue Description

Being Interested in this project, but many important docs are absent, maybe it's in progress.

What I want is an operation guide. For example, I failed to pull images with pouch cli, but I don't know the reason and how to deal with it:

root@pouch:~# pouch pull hub.c.163.com/public/nginx
hub.c.163.com/public/nginx:latest: resolving      |--------------------------------------| 
elapsed: 0.0 s                     total:   0.0 B (0.0 B/s)                                         
failed to decode: expected comma after array element

Log:

^[[34mINFO^[[0m[2017-11-23 16:56:22.239031803] Calling POST /images/create?fromImage=hub.c.163.com%2Fpublic%2Fnginx&tag=1.2.1, client @
^[[33mWARN^[[0m[2017-11-23 16:56:22.677394554] reference for unknown type: application/json; charset=utf-8  ^[[33mdigest^[[0m=sha256:ef9bd0fa2c97429562ecc209772ef07ebb9dfd66dc310ea02739d1f026dbf7b8 ^[[33mmediatype^[[0m="application/json; charset=utf-8" ^[[33msize^[[0m=16914
^[[33mWARN^[[0m[2017-11-23 16:56:22.740036552] reference for unknown type: application/json; charset=utf-8
^[[33mWARN^[[0m[2017-11-23 16:56:22.840122439] reference for unknown type: application/json; charset=utf-8
^[[31mERRO^[[0m[2017-11-23 16:56:22.885262391] failed to pull image hub.c.163.com/public/nginx:1.2.1: failed to pull image: could not fetch content descriptor sha256:ef9bd0fa2c97429562ecc209772ef07ebb9dfd66dc310ea02739d1f026dbf7b8 (application/json; charset=utf-8) from remote: not found
2017/11/23 16:56:22 http: multiple response.WriteHeader calls
^[[31mERRO^[[0m[2017-11-23 16:56:22.885360467] invoke /images/create?fromImage=hub.c.163.com%2Fpublic%2Fnginx&tag=1.2.1 error failed to pull image: could not fetch content descriptor sha256:ef9bd0fa2c97429562ecc209772ef07ebb9dfd66dc310ea02739d1f026dbf7b8 (application/json; charset=utf-8) from remote: not found. client @
^[[34mINFO^[[0m[2017-11-23 16:56:22.885379420] End of Calling POST /images/create, costs 646 ms. client @
^[[33mWARN^[[0m[2017-11-23 16:56:22.939421369] reference for unknown type: application/json; charset=utf-8
^[[34mINFO^[[0m[2017-11-23 16:56:22.939496507] fetch progress exited, ref: hub.c.163.com/public/nginx:1.2.1.
^[[31mERRO^[[0m[2017-11-23 16:56:22.939578421] failed to write object: http: wrote more than the declared Content-Length

Is it compatible with docker registry?

[feature request] support lxcfs in pouch to improve isolation

Issue Description

LXCFS is a small FUSE filesystem written with the intention of making Linux containers feel more like a virtual machine.

Pouch takes lxcfs support as a high priority.

We need to add these things in pouch with lxcfs:

  • Design document of pouch and lxcfs;
  • API integration in Pouch via lxcfs;
  • daemon side implementation
  • test for lxcfs
    • unit test
    • integration test

/cc @CodeJuan

[feature request] enhance multiple OCI runtimes support

Issue Description

Currently, pouch relies on containerd to implement raw container management. And containerd could call OCI-compatible runtime to execute container or hypervisore-based containers.

To support multiple runtimes, besides runC, runtime list should also include:

  • runV:
    • User Guidance of How to integrate:
    • Test
  • Clear Container:
    • User Guidance of How to integrate:
    • Test
  • API change design via runV or clear container
  • Doc on how to experience multi runtime with one running pouchd

/cc @Ace-Tang

[doc request] Command Line needs document to guide users

Issue Description
Currently we have implemented many cli commands in Pouch, While we have not finished the documentation work. Here I list the command line we have finished:

  • pouch create
  • pouch start
  • pouch stop
  • pouch version
  • pouch info
  • pouch volume create
  • pouch volume rm
  • pouch pull

I think document is as important as the code for this project. I suggest that finish this part as soon as possible.

/cc @alibaba/pouch

Describe what happened:
No command line document in project.

Describe what you expected to happen:
Command line doc exist in project.

How to reproduce it (as minimally and precisely as possible):
NONE

Anything else we need to know?:
NONE

Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

[bug] failed to start Pouch Daemon

Issue Description

When I run Pouch Daemon on linux machine, I ran into such as a situation:

root@ubuntu:~/go/src/github.com/alibaba/pouch# ./pouchd
ERRO[2017-11-03 15:55:04.312329177] failed to new containerd's client: failed to connect containerd: failed to dial "/var/run/containerd.sock": dial unix /var/run/containerd.sock: connect: connection refused
ERRO[2017-11-03 15:55:04.317246405] failed to wait process: /usr/local/bin/containerd, signal: killed
WARN[2017-11-03 15:55:04.317710458] process: /usr/local/bin/containerd exited
Error: failed to new daemon
Usage:
   [flags]

Flags:
  -c, --containerd string          where does containerd listened on (default "/var/run/containerd.sock")
      --containerd-config string   Specify the path of Containerd binary (default "/etc/containerd/config.toml")
      --containerd-path string     Specify the path of Containerd binary (default "/usr/local/bin/containerd")
  -D, --debug                      switch debug level
  -h, --help                       help for this command
      --home-dir string            The pouchd's home directory (default "/etc/pouchd")
  -l, --listen stringArray         which address to listen on (default [unix:///var/run/pouchd.sock])

It seems that the inner config to setup between pouchd and containerd causes this error.
In addition, I was confused that when pouch daemon met an error, it would throw out the following things:

Usage:
   [flags]

Flags:
  -c, --containerd string          where does containerd listened on (default "/var/run/containerd.sock")
      --containerd-config string   Specify the path of Containerd binary (default "/etc/containerd/config.toml")
      --containerd-path string     Specify the path of Containerd binary (default "/usr/local/bin/containerd")
  -D, --debug                      switch debug level
  -h, --help                       help for this command
      --home-dir string            The pouchd's home directory (default "/etc/pouchd")
  -l, --listen stringArray         which address to listen on (default [unix:///var/run/pouchd.sock])

Describe what happened:
Pouchd failed to start up.

Describe what you expected to happen:
Pouch works to start up.

How to reproduce it (as minimally and precisely as possible):

  1. build pouchd binary via make build
  2. execute ./pouchd

Anything else we need to know?:
NONE

Environment:

  • pouch version (use pouch version): NONE
  • OS (e.g. from /etc/os-release): ubuntu 16.04
  • Kernel (e.g. uname -a): Linux ubuntu 4.4.0-97-generic #120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools: NONE
  • Others: NONE

Question about the images in pouch

Issue Description

Tried to run pouch pull to pull images just like docker does but failed.

Describe what happened:

Run pouch pull hello-world:latest but failed to get the image. I dived into the code and found that pouch will parse the URL dummy://hello-world:latest and get the object from the URL. I am not sure what dummy:// is, and it seems that we can not use pouch like docker. Could you give me some guides to understand the concept of image in pouch?

I'd appreciate it.

Pouchd Log

INFO[2017-11-19 17:03:04.337774781] Calling POST /images/create?fromImage=hello-world&tag=latest, client @ 
ERRO[2017-11-19 17:03:04.337858143] failed to pull image hello-world:latest: failed to pull image: object required 
2017/11/19 17:03:04 http: multiple response.WriteHeader calls
ERRO[2017-11-19 17:03:04.337875015] invoke /images/create?fromImage=hello-world&tag=latest error failed to pull image: object required. client @ 
INFO[2017-11-19 17:03:04.438008556] fetch progress exited, ref: hello-world:latest. 
ERRO[2017-11-19 17:03:04.438060020] failed to write object: http: wrote more than the declared Content-Length 

Pouch Log

failed to decode: invalid character 'i' in literal false (expecting 'l') 

Describe what you expected to happen:

Pull the images successfully from docker hub or other registries.

How to reproduce it (as minimally and precisely as possible):

  1. pouch pull hello-world:latest

Anything else we need to know?:

Nothing.

Environment:

  • pouch version (use pouch version):
BuildTime:       2017-11-19T16:57:07.198242422+08:00
GitCommit:       
GoVersion:       go1.9.1
KernelVersion:   
Os:              linux
Version:         0.1.0-dev
APIVersion:      vx.y.z
Arch:            amd64
  • OS (e.g. from /etc/os-release):
NAME="Ubuntu"
VERSION="16.04.2 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.2 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
  • Kernel (e.g. uname -a):
Linux ist 4.4.0-78-generic #99-Ubuntu SMP Thu Apr 27 15:29:09 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools:
make build

New an issue for test pouchrobot

Issue Description

Describe what happened:

Describe what you expected to happen:

How to reproduce it (as minimally and precisely as possible):
1.
2.
3.

Anything else we need to know?:

Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

[feature-request] TLS support between client and daemon in Pouch

Issue Description
Currently pouch has not supported TLS, so there are threats when daemon exposes some port. Some potential hackers could connect the port remotely to influence the daemon.

Describe what happened:
Security issues may exist.

Describe what you expected to happen:
We can support TLS between client and daemon in Pouch.

How to reproduce it (as minimally and precisely as possible):
None

Anything else we need to know?:
NONE

Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

[enhancement request] container management needs to polishment

Issue Description

We need to polish container management in pouch, in API side, daemon side, client side, cli side, doc side and test side. Please record in this issue if some parts are finished.

In every aspect, if finished, please add a reference to the corresponding PR.

container create

  • container create
    • API design in swagger:
    • daemon side implement:
    • client side implement:
    • cli implement:
    • test:

container start

  • container start
    • API design in swagger:
    • daemon side implement:
    • client side implement:
    • cli implement:
    • test:

container stop

  • container stop
    • API design in swagger: #30
    • daemon side implement: #30
    • client side implement: #30
    • cli implement: #30
    • test:

container exec

  • container exec
    • API design in swagger: #149
    • daemon side implement: #149
    • client side implement: #149
    • cli implement: ##149
    • test:

container rm

  • container rm
    • API design in swagger: #214
    • daemon side implement: #214
    • client side implement: #214
    • cli implement: #214
    • test:

container ps

  • container ps
    • API design in swagger:
    • daemon side implement:
    • client side implement:
    • cli implement:
    • test:

container update

  • container update
    • API design in swagger:
    • daemon side implement:
    • client side implement:
    • cli implement:
    • test:

container inspect

  • container inspect
  • API design in swagger: #213
  • daemon side implement: #213
  • client side implement: #213
  • cli implement: #213
  • test:

container rename

  • container rename
  • API design in swagger: #220
  • daemon side implement: #220
  • client side implement: #220
  • cli implement: #220
  • test:

container stats

  • container stats
    • API design in swagger:
    • daemon side implement:
    • client side implement:
    • cli implement:
    • test:

test

  • make integration-test
  • Native CI in ubuntu
  • Native CI in redhat7
  • CI for pouch in pouch

volume metadata path is not existed

Issue Description
If volume metadata path is not existed, start pouchd cause this error: open /etc/pouchd/volume/volume.db: no such file or directory

make build error

Issue Description
make build failed in pouch

Describe what happened:
root@4168f68aa40c:~/pouch# make build
GOOS=linux go build -o pouchd
main.go:10:2: cannot find package "github.com/alibaba/pouch/daemon" in any of:
/usr/local/go/src/github.com/alibaba/pouch/daemon (from $GOROOT)
/src/github.com/alibaba/pouch/daemon (from $GOPATH)
main.go:11:2: cannot find package "github.com/alibaba/pouch/daemon/config" in any of:
/usr/local/go/src/github.com/alibaba/pouch/daemon/config (from $GOROOT)
/src/github.com/alibaba/pouch/daemon/config (from $GOPATH)
main.go:12:2: cannot find package "github.com/alibaba/pouch/pkg/exec" in any of:
/usr/local/go/src/github.com/alibaba/pouch/pkg/exec (from $GOROOT)
/src/github.com/alibaba/pouch/pkg/exec (from $GOPATH)
main.go:13:2: cannot find package "github.com/alibaba/pouch/pkg/utils" in any of:
/usr/local/go/src/github.com/alibaba/pouch/pkg/utils (from $GOROOT)
/src/github.com/alibaba/pouch/pkg/utils (from $GOPATH)
volume_build.go:10:8: cannot find package "github.com/alibaba/pouch/volume/modules/ceph" in any of:
/usr/local/go/src/github.com/alibaba/pouch/volume/modules/ceph (from $GOROOT)
/src/github.com/alibaba/pouch/volume/modules/ceph (from $GOPATH)
volume_build.go:12:8: cannot find package "github.com/alibaba/pouch/volume/modules/local" in any of:
/usr/local/go/src/github.com/alibaba/pouch/volume/modules/local (from $GOROOT)
/src/github.com/alibaba/pouch/volume/modules/local (from $GOPATH)
volume_build.go:11:8: cannot find package "github.com/alibaba/pouch/volume/modules/tmpfs" in any of:
/usr/local/go/src/github.com/alibaba/pouch/volume/modules/tmpfs (from $GOROOT)
/src/github.com/alibaba/pouch/volume/modules/tmpfs (from $GOPATH)
volume_build.go:8:8: cannot find package "github.com/alibaba/pouch/volume/store/boltdb" in any of:
/usr/local/go/src/github.com/alibaba/pouch/volume/store/boltdb (from $GOROOT)
/src/github.com/alibaba/pouch/volume/store/boltdb (from $GOPATH)
main.go:15:2: cannot find package "github.com/sirupsen/logrus" in any of:
/usr/local/go/src/github.com/sirupsen/logrus (from $GOROOT)
/src/github.com/sirupsen/logrus (from $GOPATH)
main.go:16:2: cannot find package "github.com/spf13/cobra" in any of:
/usr/local/go/src/github.com/spf13/cobra (from $GOROOT)
/src/github.com/spf13/cobra (from $GOPATH)
Makefile:16: recipe for target 'server' failed

Describe what you expected to happen:

How to reproduce it (as minimally and precisely as possible):

  1. docker build -f Dockerfile -t pouch:v1 .
  2. docker run -it -d --name pouch pouch:v1 bash
  3. docker exec -it pouch bash
  4. git clone https://github.com/alibaba/pouch.git
  5. cd pouch && make build

Anything else we need to know?:

Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

[bugfix] add `make build` in travisCI in test

Issue Description
Currently we do not execute make build in travisCI, so if the commit user put forward cannot be compiled, the CI will not report this compile error.

Need to add this part.

Describe what happened:
Code error will not throw compile error

Describe what you expected to happen:
Code error would throw out compile error

How to reproduce it (as minimally and precisely as possible):
NONE

Anything else we need to know?:
NONE

Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

[bug] pouch CMD should return non-zero for wrong options.

Issue Description

Describe what happened:
For invalid CMD options, pouch should return non-zero exited code instead of 1.
Describe what you expected to happen:

How to reproduce it (as minimally and precisely as possible):

#pouch xxx
Error: unknown command "xxx" for "pouch"
Run 'pouch --help' for usage.

#echo $?
0

Anything else we need to know?:

Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

[doc request] how to integrate pouch with dragonfly

Issue Description

Dragonfly is a useful P2P container image distribution software tool which fits for very large size of cluster, maybe 2000+ node.

We need document to guide us:

  • how to integrate pouch with dragonfly;
  • then how to use them.
  • performance test result if there is.

[bug] go report tells code needs improvement

Issue Description

In README.md if we click go report, we will turn to link https://goreportcard.com/report/github.com/alibaba/pouch

There we found that there are several parts to be improve, such as:

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.
pouch/cli/pull.go
Line 94: error: unrecognized printf verb 'r' (vet)
Line 102: error: unrecognized printf verb 'r' (vet)
Line 109: error: unrecognized printf verb 'r' (vet)

and

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.
pouch/volume/core.go
Line 95: warning: cyclomatic complexity 16 of function (*Core).CreateVolume() is high (> 15) (gocyclo)
pouch/ctrd/image.go
Line 130: warning: cyclomatic complexity 22 of function (*Client).fetchProgress() is high (> 15) (gocyclo)

and

Misspell Finds commonly misspelled English words
pouch/test/pouch_api_help_test.go
Line 15: warning: "begining" is a misspelling of "beginning" (misspell)
pouch/test/pouch_cli_help_test.go
Line 17: warning: "begining" is a misspelling of "beginning" (misspell)
pouch/test/pouch_cli_version_test.go
Line 17: warning: "begining" is a misspelling of "beginning" (misspell)
pouch/volume/driver/driver.go
Line 150: warning: "registed" is a misspelling of "registered" (misspell)

and so so.

These all needs fixed.

Add pouch/client package

Issue Description
Add a client package to encapsulate client related functions.

Describe what happened:
When I want to communicate with pouch daemon, I hope there is a client package, which provides functions that can make it easy to build a client within several code lines.

Describe what you expected to happen:
sth like docker client package

[enhancement request] image management implementation

Issue Description

We need to polish image management in pouch, in API side, daemon side, client side, cli side, doc side and test side. Please record in this issue if some parts are finished.

In every aspect, if finished, please add a reference to the corresponding PR.

image pull

  • image pull
    • API design in swagger:
    • daemon side implement:
    • client side implement:
    • cli implement:
    • document:
    • test:

image list

  • image list
    • API design in swagger:
    • daemon side implement:
    • client side implement:
    • cli implement:
    • document:
    • test:

image rm

  • image rm
    • API design in swagger:
    • daemon side implement:
    • client side implement:
    • cli implement:
    • document:
    • test:

image inspect

  • image inspect @0x04C2
    • API design in swagger:
    • daemon side implement:
    • client side implement:
    • cli implement:
    • document:
    • test:

How to install pouch on various platform or os?

Issue Description
I think currently in the repo there is no installation guidance for pouch on various platform or os.
This is almost a disaster for one software. We are looking forward to having this ASAP.

Describe what happened:
No installation doc in repo.

Describe what you expected to happen:
There is installation docs in repo.

How to reproduce it (as minimally and precisely as possible):
NONE

Anything else we need to know?:
NONE

Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

[bug report] pouch pull failed

Issue Description
is pouch pull function fully completed? and is there any doc about pouch usage?
i got failed when using pouch pull.

Describe what happened:

  1. i just use pouch pull nginx, and return an error.
    image
  2. i use the image from alibaba to do pouch pull, also got error.

./pouch pull reg.docker.alibaba-inc.com/busybox:latest

image
image
3. i use pouch create to create a container from image. i found that there is no image in "pouch images".
image

Describe what you expected to happen:

  1. i want to got docker images from all kinds of repository.
  2. i think pouch should pull images automatically when i use "pouch create ..."
  3. also, pouch pull should be worked.

How to reproduce it (as minimally and precisely as possible):

  1. ./pouch pull nginx
  2. ./pouch pull reg.docker.alibaba-inc.com/busybox:latest

Anything else we need to know?:
image

Environment:

  • pouch version (use pouch version):

GoVersion: go1.8.3
KernelVersion:
Os: linux
Version: 0.1.0-dev
APIVersion: vx.y.z
Arch: amd64
BuildTime: 2017-11-14T10:46:18.071044934+08:00
GitCommit:

  • OS (e.g. from /etc/os-release):

NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

  • Kernel (e.g. uname -a):

Linux thinkcenter 3.10.0-693.2.2.el7.x86_64 #1 SMP Tue Sep 12 22:26:13 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

  • Install tools:
  • Others:

runc version 1.0.0-rc4+dev
commit: b2567b37d7b75eb4cf325b77297b140ea686ce8f
spec: 1.0.0

containerd github.com/containerd/containerd v1.0.0-beta.3-8-g732b156 732b156

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.