-
Notifications
You must be signed in to change notification settings - Fork 655
/var/run/utmp is a directory ? #2676
Comments
The issue is we're deploying Telegraf as a docker container as a part of our cloud-config. Here is the relevant configuration: telegraf:
container_name: telegraf
image: telegraf:1.9.4-alpine
restart: always
volumes:
- /home/rancher/telegraf:/etc/telegraf:ro
- /sys:/rootfs/sys:ro
- /proc:/rootfs/proc:ro
- /var/run/utmp:/var/run/utmp:ro
- /var/run/docker.sock:/var/run/docker.sock:ro The issue this produces in the logs is:
We care about the system input for Telegraf because we like to gather the load averages from our servers. I haven't had much luck finding a workaround on the internet but I'll continue looking. I figured I should first clarify if this is expected behavior. |
@jbrockopp I use the same steps on docker-machine virtualbox and cannot reproduce this issue. Using default console to startup telegraf:
Using centos console to startup telegraf:
|
@Jason-ZW first off, let me say thank you for your quick response and looking into this 👍 Thinking further on this, maybe it has to do with how I'm activating the Centos console? For context: We are using Packer to build our image that I'm seeing this behavior on and to ensure we have the Centos console enabled as a part of the image we run the following in our Packer template: "provisioners": [
{
"type": "shell",
"expect_disconnect": true,
"inline": [
"sudo ros console switch --force centos"
]
}
]
} Is it fair if I dig into this more over the weekend and report back with the results I find? |
@jbrockopp You may need
|
@Jason-ZW after digging into this more, even if I switched to the I then tried to use the Attempt 1: #cloud-config
rancher:
autologin:
- tty1
- ttyS0
console: centos Attempt 2: #cloud-config
rancher:
autologin: tty1
autologin: ttyS0
console: centos I then decided to see if I could set the kernel parameters, as suggested above, and was still unsuccessful. To update the kernel, I used the in-place editing method. When I ran
I added the suggested changes
I then ran a I'm wondering how exactly I go about enabling it via the cloud-config? Or did I update it via the kernel parameters incorrectly? |
@jbrockopp
|
@Jason-ZW I had not previously. I just tried this morning and it still doesn't appear to work When I run
System details:
I then followed your instructions to remove
I then rebooted with
|
@jbrockopp |
@Jason-ZW I did as you asked. When I remove the telegraf service this is what I saw:
You'll note that a I then edited the kernel parameters with
I then rebooted with
So again, no Rather then tuning kernel parameters, is there way I can use |
@jbrockopp |
@Jason-ZW glad we're able to reproduce the issue now. Please let me know if there is anything else you need from me 👍 |
@Jason-ZW is there an update on this? We run RancherOS in production so it's important to us that we have all the metrics we need. |
@jbrockopp The agetty can update the utmp file, but agetty in default console is different from other consoles, it's built by busybox. So you can try this workaround: https://rancher.com/docs/os/v1.x/en/installation/configuration/running-commands/
I can get the content of utmp file after trying this workaround:
|
Tested with rancher/os:v1.5.2-rc1 from May 17 |
@Jason-ZW @niusmallnan @rootwuj After deploying RancherOS Thanks for all the work on this! |
RancherOS Version: (ros os version)
Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.)
OpenStack
I think I found a bug so I'm opening this to get confirmation of expected behavior in regards to
/var/run/utmp
is no longer a file but a directory if you switch your console from the default.I have two servers, one with the
default
console enabled and one with thecentos
console enabled.Default Console:
Centos Console:
Is it expected behavior that when you switch your console to something besides
default
, it converts the/var/run/utmp
to a directory? Or is this a bug?I'll post in the next comment how this is affecting me.
The text was updated successfully, but these errors were encountered: