Commit Graph

2599 Commits

Author SHA1 Message Date
Zhao Lei 34d100f970 manual: add manual for ps command
This patch add manual for ps command, and remove remove example
for --format command, which is not necessary.

Suggested-by: Aleksa Sarai <asarai@suse.de>
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2016-05-25 17:32:14 +08:00
Zhao Lei 935eba1cc1 manual: update: Add kernelTCP configuration into code's --help
To make --help option output same example with man.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2016-05-25 17:23:07 +08:00
Zhao Lei f5b674c914 manual: restore: Update contents with source
This patch add losted --no-subreaper and --no-pivot options in
manual:
 # ./runc restore --help
 ..
 OPTIONS:
   ...
   --no-subreaper               disable the use of the subreaper used to reap reparented processes
   --no-pivot                   do not use pivot root to jail process inside rootfs.  This should be used whenever the rootfs is on top of a ramdisk
 #

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2016-05-25 17:23:07 +08:00
Zhao Lei 7d5779fdee manual: list: Move description contents into OPTIONS field
The description contents in manual is for --format argument
actually, see:
 # ./runc list --help
 ...
 OPTIONS:
    --format, -f         select one of: table or json.

 The default format is table.  The following will output the list of containers
 in json format:

     # runc list -f json
    --quiet, -q  display only container IDs
 #

This patch move above content into right place, and remove the command
example which is not necessary.

Suggested-by: Aleksa Sarai <asarai@suse.de>
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2016-05-25 17:18:30 +08:00
Zhao Lei f79716d6cf Unify log setting's error output
When we set a wrong --log-format value, runc exit without any
message:
 # ./runc --log-format aaa list
 #
It is again "no news is good news" rule.

And it is not unified with the case when we set a wrong --log
value:
 # ./runc --log / list
 ERRO[0000] open /: is a directory
 open /: is a directory
 #

This patch unified action for above two error-setting.

After patch:
 # ./runc --log-format aaa list
 unknown log-format: "aaa"
 #

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2016-05-25 16:10:30 +08:00
Aleksa Sarai fa5ce1e2d0 Merge pull request #842 from cyphar/update-seccomp
godeps: update seccomp to 60c9953736798c4a04e90d0f3da2f933d44fd4c4
2016-05-25 14:49:07 +10:00
Zhao Lei aedafa9965 manual: runc-exec: Add losted --no-subreaper argument
--no-subreaper's description exist in code but not in manual:
 # ./runc exec --help
 ...
 OPTIONS:
   ...
   --no-subreaper                               disable the use of the subreaper used to reap reparented processes
 #

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2016-05-25 10:48:11 +08:00
Zhao Lei f6e4d7ba7c manual: Update runc-events.8.md with source
--events argument's usage was updated by:
commit:a62dbf48b0fe5e2e28e3cc9dc80a70d2ec5ebc25
We need to update manual together.

This patch also removes last useless blank line
in manual.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2016-05-25 10:48:11 +08:00
Zhao Lei 8cd952f0a2 manual: Unify EXAMPLE title in code and manual
There are 3 types of EXAMPLE title in manual and code:
1: "# EXAMPLE"
   runc-delete.8.md
   runc-exec.8.md
   runc-kill.8.md
2: "EXAMPE:"
   runc-spec.8.md
3: EXAMPLE title exist in manual, but not exist in code's --help output
   delete.go
   exec.go
   kill.go

This patch unified above format, and deleted some useless blanks.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2016-05-25 10:48:11 +08:00
Zhao Lei a6a0cdf53d manual: Use SYNOPSIS instead of USAGE in man/runc-checkpoint.8.md
Reason1:
 other runc manual are using word of "SYNOPSIS"
 # grep USAGE man/*
 # man/runc-checkpoint.8.md:#USAGE
 #
 # grep SYNOPSIS man/*
 man/runc-checkpoint.8.md:# SYNOPSIS
 man/runc-delete.8.md:# SYNOPSIS
 man/runc-events.8.md:# SYNOPSIS
 man/runc-exec.8.md:# SYNOPSIS
 man/runc-kill.8.md:# SYNOPSIS
 man/runc-list.8.md:# SYNOPSIS
 man/runc-pause.8.md:# SYNOPSIS
 man/runc-restore.8.md:# SYNOPSIS
 man/runc-resume.8.md:# SYNOPSIS
 man/runc-spec.8.md:# SYNOPSIS
 man/runc-start.8.md:# SYNOPSIS
 man/runc-state.8.md:# SYNOPSIS
 man/runc-update.8.md:# SYNOPSIS
 man/runc.8.md:# SYNOPSIS
 #

Reason2:
 Most linux commands are using word of "SYNOPSIS"
 # man ls
 # man find
 # ...

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2016-05-25 10:48:11 +08:00
Aleksa Sarai 089b05a512 godeps: update seccomp to 60c9953736798c4a04e90d0f3da2f933d44fd4c4
This update allows more distributions to build runC with seccomp out of
the box (the include path and library paths are not always the Go
defaults).  In addition, update the test's Dockerfile to have pkg-config
installed.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-05-25 07:58:28 +10:00
Mrunal Patel aa7e27eac9 Merge pull request #828 from hqhq/hq_fix_update_kmem
Fix update kernel memory test
2016-05-24 09:58:09 -07:00
Qiang Huang d2d09b9bcd Merge pull request #836 from cyphar/console-chown
*: correctly chown() consoles
2016-05-23 10:25:45 +08:00
Aleksa Sarai 1a913c7b89 *: correctly chown() consoles
In user namespaces, we need to make sure we don't chown() the console to
unmapped users. This means we need to get both the UID and GID of the
root user in the container when changing the owner.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-05-22 22:37:13 +10:00
Mrunal Patel 60eb77dd3c Merge pull request #810 from hqhq/hq_update_cli
Update cli package
2016-05-20 20:46:59 -07:00
Qiang Huang 153b12921c Merge pull request #835 from zhaoleidd/fix_outdated_comment
Fix outdated comment for loadSpec
2016-05-20 20:46:13 -05:00
Zhao Lei 198e2771ac Fix outdated comment for loadSpec
loadSpec() is not support blank path now, remove relative comments.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2016-05-20 19:05:00 +08:00
Qiang Huang c8b20e7706 Merge pull request #833 from zhaoleidd/fix_manual_spelling_typo
Fix some spelling typo in manual
2016-05-20 02:23:05 -05:00
Zhao Lei a0096535a6 Fix some spelling typo in manual and source
infomation -> information
transfered -> transferred

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2016-05-20 15:04:40 +08:00
Alexander Morozov e574996911 Merge pull request #832 from valasabk/fuxofrunccomment
libcontainer: Fix Running Comment
2016-05-19 13:42:26 -07:00
Bhanu Valasa 32c2d48a6f libcontainer: Fix Running Comment
Signed-off-by: Bhanu Valasa <valasabk@yahoo.com>
2016-05-19 16:30:29 -04:00
Mrunal Patel 419d5be191 Merge pull request #830 from rajasec/spec-descr
Updated description in SPEC
2016-05-19 08:00:36 -07:00
Mrunal Patel d1997d99cd Merge pull request #826 from hqhq/hq_add_check_config
Add check_config.sh for runc
2016-05-18 16:42:30 -07:00
Qiang Huang 396c88215c Fix update kernel memory test
Since kernel 4.6, we can update kernel memory without
initialization, because it's accounted by default.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-05-17 20:51:02 -04:00
rajasec e33c057114 Updating description in SPEC
Signed-off-by: rajasec <rajasec79@gmail.com>
2016-05-17 22:57:43 +05:30
Aleksa Sarai fdc9fb841e Merge pull request #825 from hqhq/hq_fix_isrunning
Add comments for error cases in status functions
2016-05-17 05:04:25 +00:00
Mrunal Patel 0d8878a6c0 Merge pull request #812 from cyphar/integration-fix-cgroup-parsing
integration: fix cgroup parsing
2016-05-16 19:32:19 -07:00
Mrunal Patel b53e466d0c Merge pull request #824 from ggaaooppeenngg/update-nsenter-readme
Update nsenter README
2016-05-16 17:26:32 -07:00
Michael Crosby 734f6a7529 Merge pull request #822 from rajasec/update-manpage
Updating runc man page
2016-05-16 17:18:17 -07:00
Michael Crosby dd389fd665 Merge pull request #823 from mlaventure/alpine-getlongbit
Fix GetLongBit() returns value when _SC_LONG_BIT is not available
2016-05-16 17:15:52 -07:00
Mrunal Patel f0ec80b93c Merge pull request #821 from runcom/warnings
libcontainer: nsenter: nsexec.c: fix warnings
2016-05-16 09:38:45 -07:00
Aleksa Sarai f89dcc665b integration: remove pointless *_inroot invocations
--root invocations make tests harder to read, and they only serve a very
specific purpose. As such, remove them from the `runc update` tests
because they don't serve a purpose.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-05-17 01:48:29 +10:00
Aleksa Sarai c823933fe1 integration: fix cgroup parsing
On some systems, the cgroup hierarchies are grouped together
(cpu,cpuacct). In order to avoid fake failures, update the cgroup
parsing to just check whether or not the mountinfo options *contain* the
cgroup type.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-05-17 01:48:29 +10:00
Aleksa Sarai 39aa5d0b1a tests: remove trailing whitespace
Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-05-17 01:48:29 +10:00
Qiang Huang a04c569b90 Add check_config.sh for runc
It copied from docker and removed unnecessary configs.

Closes: https://github.com/opencontainers/runc/issues/819

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-05-16 19:15:45 +08:00
Qiang Huang b6e23f8166 Add comments for error cases in status functions
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-05-16 18:24:07 +08:00
Peng Gao b7219cc2b3 Update nsenter README
Signed-off-by: Peng Gao <peng.gao.dut@gmail.com>
2016-05-14 22:38:43 +08:00
Antonio Murdaca 9d14efec4c libcontainer: nsenter: nsexec.c: fix warnings
Fix the following warnings when building runc with gcc 6+:

Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/nsenter/nsexec.c:
In function ‘nsexec’:
Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/nsenter/nsexec.c:322:6:
warning: ‘__s’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
      pr_perror("Failed to open %s", ns);
Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/nsenter/nsexec.c:273:30:
note: ‘__s’ was declared here
 static struct nsenter_config process_nl_attributes(int pipenum, char
*data, int data_size)
                              ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-05-14 11:19:44 +02:00
Kenfe-Mickael Laventure 10a3c26c9a Fix GetLongBit() returns value when _SC_LONG_BIT is not available
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-05-13 09:37:58 -07:00
rajasec ffd5002a18 Updating runc man page
Signed-off-by: rajasec <rajasec79@gmail.com>

Fixed the review comment

Signed-off-by: rajasec <rajasec79@gmail.com>
2016-05-12 22:43:10 +05:30
Michael Crosby c6a791bef9 Merge pull request #816 from opencontainers/revert-796-relabeldev
Revert "Need to make sure labels applied to /dev"
2016-05-11 11:41:50 -07:00
Aleksa Sarai e991f041a1 Revert "Need to make sure labels applied to /dev"
Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-05-11 23:28:01 +10:00
Aleksa Sarai 9bc97e2291 Merge pull request #813 from rajasec/update-kmem-tcp
Adding kernel mem tcp for update command
2016-05-11 08:31:47 +00:00
rajasec 8839f9f70b Adding kernel mem tcp for update command
Signed-off-by: rajasec <rajasec79@gmail.com>

Adding kernel mem tcp for update command

Signed-off-by: rajasec <rajasec79@gmail.com>

Fixing update.bats to reduce the TCP value

Signed-off-by: rajasec <rajasec79@gmail.com>

Updated the kernelTCP in bats as per json

Signed-off-by: rajasec <rajasec79@gmail.com>

Fixed some minor issue in bats file

Signed-off-by: rajasec <rajasec79@gmail.com>

Rounded off to right bytes for kernel TCP

Signed-off-by: rajasec <rajasec79@gmail.com>

Updating man file for update command

Signed-off-by: rajasec <rajasec79@gmail.com>
2016-05-10 14:11:36 +05:30
Qiang Huang 8477638aab Update cli package
The old one has bug when showing help message for IntFlags.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-05-10 13:58:09 +08:00
Mrunal Patel be46e644f6 Merge pull request #809 from hqhq/hq_add_update_man
Add man page and fix typo for update command
2016-05-09 19:17:10 -07:00
Qiang Huang e75465b1a3 Add man page and fix typo for update command
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-05-09 19:04:25 +08:00
Qiang Huang d49ece5a83 Merge pull request #790 from mlaventure/runc-update-cgroup-kmem-limit
Runc update cgroup kmem limit
2016-05-09 14:01:18 +08:00
Kenfe-Mickael Laventure d78ae51a2d Add test for cgroup memory.kmem.limit_in_bytes handling
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-05-06 08:05:15 -07:00
Kenfe-Mickael Laventure 4190e5a920 Add new `update` command to runc.
This command allow users to update some of a container cgroups
parameters.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-05-06 08:05:15 -07:00