Bug 1130500 - nsinit stats doesnt work
Summary: nsinit stats doesnt work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: golang-github-docker-libcontainer
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Lokesh Mandvekar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-15 12:44 UTC by Jeremy Eder
Modified: 2014-12-18 06:08 UTC (History)
3 users (show)

Fixed In Version: golang-github-docker-libcontainer-1.2.0-3.git28cb5f9.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-29 05:50:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jeremy Eder 2014-08-15 12:44:47 UTC
Description of problem:

old version of nsinit was built, so 'nsinit stats' doesn't work.

# nsinit stats
2014/08/15 08:42:13 Failed to get stats - getting stats for system "memory" open /sys/fs/cgroup/memory/docker/cfd66e15a70d99267769eefba47d9dc82d73a09797388808e09a5ea328a2769e/memory.stat: no such file or directory

But then compile one from HEAD of upstream libcontainer, and it works fine:

# /tmp/nsinit stats
{
	"network_stats": {
<snip>

Comment 1 Lokesh Mandvekar 2014-08-15 15:22:05 UTC
Jeremy, I don't see a bug description, but is the error something like this:

2014/08/15 10:20:06 open container.json: no such file or directory

Comment 2 Fedora Update System 2014-08-16 01:43:26 UTC
golang-github-docker-libcontainer-1.1.0-7.git29363e2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/golang-github-docker-libcontainer-1.1.0-7.git29363e2.fc20

Comment 3 Fedora Update System 2014-08-16 22:31:12 UTC
Package golang-github-docker-libcontainer-1.1.0-7.git29363e2.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing golang-github-docker-libcontainer-1.1.0-7.git29363e2.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-9508/golang-github-docker-libcontainer-1.1.0-7.git29363e2.fc20
then log in and leave karma (feedback).

Comment 4 lnie 2014-08-18 06:26:31 UTC
Tested with golang-github-docker-libcontainer-1.1.0-7.git29363e2.fc20 ,still got the same output in Com1

Comment 5 Jeremy Eder 2014-08-18 11:22:01 UTC
Thanks Lokesh, after upgrading golang-github-docker-libcontainer to this test build, I get expected output:

# rpm -q golang-github-docker-libcontainer
golang-github-docker-libcontainer-1.1.0-6.fc20.x86_64
# pwd
/var/lib/docker/execdriver/native/272071e59517c696bbd063a33d1b8e357e5b22ed0ac49d99f39077e0a134a30a
# nsinit config
No help topic for 'config'
# nsinit stats
2014/08/18 07:19:05 Failed to get stats - getting stats for system "memory" open /sys/fs/cgroup/memory/docker/272071e59517c696bbd063a33d1b8e357e5b22ed0ac49d99f39077e0a134a30a/memory.stat: no such file or directory




# yum install -y --enablerepo=updates-testing golang-github-docker-libcontainer-1.1.0-7.git29363e2.fc20
<snip>
# rpm -q golang-github-docker-libcontainer
golang-github-docker-libcontainer-1.1.0-7.git29363e2.fc20.x86_64

# nsinit config
{
	"mount_config": {
		"mounts": [
			{
				"type": "bind",
				"source": "/var/lib/docker/init/dockerinit-1.1.2",
				"destination": "/.dockerinit",
				"private": true
			},
			{
				"type": "bind",
				"source": "/etc/resolv.conf",
				"destination": "/etc/resolv.conf",
				"private": true
			},
			{
				"type": "bind",
				"source": "/var/lib/docker/containers/272071e59517c696bbd063a33d1b8e357e5b22ed0ac49d99f39077e0a134a30a/hostname",
				"destination": "/etc/hostname",
				"private": true
			},
			{
				"type": "bind",
				"source": "/var/lib/docker/containers/272071e59517c696bbd063a33d1b8e357e5b22ed0ac49d99f39077e0a134a30a/hosts",
				"destination": "/etc/hosts",
				"private": true
			}
		],
		"device_nodes": [
			{
				"type": 99,
				"path": "/dev/fuse",
				"major_number": 10,
				"minor_number": 229,
				"cgroup_permissions": "rwm"
			},
			{
				"type": 99,
				"path": "/dev/null",
				"major_number": 1,
				"minor_number": 3,
				"cgroup_permissions": "rwm",
				"file_mode": 438
			},
			{
				"type": 99,
				"path": "/dev/zero",
				"major_number": 1,
				"minor_number": 5,
				"cgroup_permissions": "rwm",
				"file_mode": 438
			},
			{
				"type": 99,
				"path": "/dev/full",
				"major_number": 1,
				"minor_number": 7,
				"cgroup_permissions": "rwm",
				"file_mode": 438
			},
			{
				"type": 99,
				"path": "/dev/tty",
				"major_number": 5,
				"cgroup_permissions": "rwm",
				"file_mode": 438
			},
			{
				"type": 99,
				"path": "/dev/urandom",
				"major_number": 1,
				"minor_number": 9,
				"cgroup_permissions": "rwm",
				"file_mode": 438
			},
			{
				"type": 99,
				"path": "/dev/random",
				"major_number": 1,
				"minor_number": 8,
				"cgroup_permissions": "rwm",
				"file_mode": 438
			}
		],
		"mount_label": "system_u:object_r:svirt_sandbox_file_t:s0:c486,c915"
	},
	"hostname": "272071e59517",
	"environment": [
		"HOME=/",
		"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
		"HOSTNAME=272071e59517",
		"TERM=xterm"
	],
	"tty": true,
	"namespaces": {
		"NEWIPC": true,
		"NEWNET": true,
		"NEWNS": true,
		"NEWPID": true,
		"NEWUTS": true
	},
	"capabilities": [
		"CHOWN",
		"DAC_OVERRIDE",
		"FOWNER",
		"MKNOD",
		"NET_RAW",
		"SETGID",
		"SETUID",
		"SETFCAP",
		"SETPCAP",
		"NET_BIND_SERVICE",
		"SYS_CHROOT",
		"KILL",
		"AUDIT_WRITE"
	],
	"networks": [
		{
			"type": "loopback",
			"address": "127.0.0.1/0",
			"gateway": "localhost",
			"mtu": 1500
		},
		{
			"type": "veth",
			"bridge": "docker0",
			"veth_prefix": "veth",
			"address": "172.17.0.3/16",
			"gateway": "172.17.42.1",
			"mtu": 1500
		}
	],
	"cgroups": {
		"name": "272071e59517c696bbd063a33d1b8e357e5b22ed0ac49d99f39077e0a134a30a",
		"parent": "docker",
		"allowed_devices": [
			{
				"type": 99,
				"major_number": -1,
				"minor_number": -1,
				"cgroup_permissions": "m"
			},
			{
				"type": 98,
				"major_number": -1,
				"minor_number": -1,
				"cgroup_permissions": "m"
			},
			{
				"type": 99,
				"path": "/dev/console",
				"major_number": 5,
				"minor_number": 1,
				"cgroup_permissions": "rwm"
			},
			{
				"type": 99,
				"path": "/dev/tty0",
				"major_number": 4,
				"cgroup_permissions": "rwm"
			},
			{
				"type": 99,
				"path": "/dev/tty1",
				"major_number": 4,
				"minor_number": 1,
				"cgroup_permissions": "rwm"
			},
			{
				"type": 99,
				"major_number": 136,
				"minor_number": -1,
				"cgroup_permissions": "rwm"
			},
			{
				"type": 99,
				"major_number": 5,
				"minor_number": 2,
				"cgroup_permissions": "rwm"
			},
			{
				"type": 99,
				"major_number": 10,
				"minor_number": 200,
				"cgroup_permissions": "rwm"
			},
			{
				"type": 99,
				"path": "/dev/null",
				"major_number": 1,
				"minor_number": 3,
				"cgroup_permissions": "rwm",
				"file_mode": 438
			},
			{
				"type": 99,
				"path": "/dev/zero",
				"major_number": 1,
				"minor_number": 5,
				"cgroup_permissions": "rwm",
				"file_mode": 438
			},
			{
				"type": 99,
				"path": "/dev/full",
				"major_number": 1,
				"minor_number": 7,
				"cgroup_permissions": "rwm",
				"file_mode": 438
			},
			{
				"type": 99,
				"path": "/dev/tty",
				"major_number": 5,
				"cgroup_permissions": "rwm",
				"file_mode": 438
			},
			{
				"type": 99,
				"path": "/dev/urandom",
				"major_number": 1,
				"minor_number": 9,
				"cgroup_permissions": "rwm",
				"file_mode": 438
			},
			{
				"type": 99,
				"path": "/dev/random",
				"major_number": 1,
				"minor_number": 8,
				"cgroup_permissions": "rwm",
				"file_mode": 438
			}
		]
	},
	"process_label": "system_u:system_r:svirt_lxc_net_t:s0:c486,c915",
	"restrict_sys": true
}

# nsinit stats
{
	"network_stats": {
		"rx_bytes": 4050,
		"rx_packets": 41,
		"rx_errors": 0,
		"rx_dropped": 1,
		"tx_bytes": 648,
		"tx_packets": 8,
		"tx_errors": 0,
		"tx_dropped": 0
	},
	"cgroup_stats": {
		"cpu_stats": {
			"cpu_usage": {
				"total_usage": 14868483,
				"percpu_usage": [
					1033571,
					3408829,
					156008,
					69278,
					182780,
					4013311,
					0,
					0,
					0,
					1889845,
					0,
					0,
					0,
					95849,
					0,
					0,
					3195059,
					328859,
					0,
					495094,
					0,
					0,
					0,
					0
				],
				"usage_in_kernelmode": 10000000,
				"usage_in_usermode": 0
			},
			"throlling_data": {}
		},
		"memory_stats": {
			"usage": 1028096,
			"max_usage": 1306624,
			"stats": {
				"active_anon": 94208,
				"active_file": 36864,
				"cache": 880640,
				"hierarchical_memory_limit": 18446744073709551615,
				"hierarchical_memsw_limit": 18446744073709551615,
				"inactive_anon": 0,
				"inactive_file": 843776,
				"mapped_file": 626688,
				"pgfault": 130,
				"pgmajfault": 6,
				"pgpgin": 313,
				"pgpgout": 75,
				"recent_rotated_anon": 79,
				"recent_rotated_file": 9,
				"recent_scanned_anon": 79,
				"recent_scanned_file": 219,
				"rss": 94208,
				"rss_huge": 0,
				"swap": 0,
				"total_active_anon": 94208,
				"total_active_file": 36864,
				"total_cache": 880640,
				"total_inactive_anon": 0,
				"total_inactive_file": 843776,
				"total_mapped_file": 626688,
				"total_pgfault": 130,
				"total_pgmajfault": 6,
				"total_pgpgin": 313,
				"total_pgpgout": 75,
				"total_rss": 94208,
				"total_rss_huge": 0,
				"total_swap": 0,
				"total_unevictable": 0,
				"total_writeback": 0,
				"unevictable": 0,
				"writeback": 0
			},
			"failcnt": 0
		},
		"blkio_stats": {}
	}
}

Comment 6 Fedora Update System 2014-08-22 21:47:53 UTC
golang-github-docker-libcontainer-1.1.0-9.gitdb65c35.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/golang-github-docker-libcontainer-1.1.0-9.gitdb65c35.fc20

Comment 7 Lokesh Mandvekar 2014-08-23 19:06:35 UTC
Pushing new builds for libcontainer required for docker 1.2.0. Looks like they'll keep getting posted here since the original build which solved this bug hasn't been pushed to stable yet.

Comment 8 Lokesh Mandvekar 2014-09-29 05:50:22 UTC
This should be taken care of in golang-github-docker-libcontainer-1.1.0-10.gitdb65c35

Comment 9 Lokesh Mandvekar 2014-09-29 05:51:19 UTC
ugh, ignore Comment 8. Comment 6 addressed it already.

Comment 10 Fedora Update System 2014-10-20 16:56:44 UTC
golang-github-docker-libcontainer-1.2.0-1.gitc907e40.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/golang-github-docker-libcontainer-1.2.0-1.gitc907e40.fc20

Comment 11 Fedora Update System 2014-10-22 19:20:47 UTC
golang-github-docker-libcontainer-1.2.0-2.gitc907e40.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/golang-github-docker-libcontainer-1.2.0-2.gitc907e40.fc20

Comment 12 Fedora Update System 2014-11-18 14:57:54 UTC
golang-github-docker-libcontainer-1.2.0-3.git28cb5f9.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/golang-github-docker-libcontainer-1.2.0-3.git28cb5f9.fc20

Comment 13 Fedora Update System 2014-12-18 06:08:26 UTC
golang-github-docker-libcontainer-1.2.0-3.git28cb5f9.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.