Watchdog package is messing up the /dev/rtc file causing timedatectl to fail

Bug #1758911 reported by Petr Ruzicka
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
watchdog (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
* Once the watchdog package is installed, users can not use timedatectl, because watchdog package
  recreated /dev/rtc.

[Test Case]
* On a Ubuntu system:
    # Check the /dev/rtc* files:
    - ls -l /dev/rtc*
      lrwxrwxrwx 1 root root 4 Mar 26 10:38 /dev/rtc -> rtc0
      crw------- 1 root root 251, 0 Mar 26 10:38 /dev/rtc0

    # Run timedatectl command:
    - timedatectl status
            Local time: Mon 2018-03-26 09:06:56 UTC
        Universal time: Mon 2018-03-26 09:06:56 UTC
              RTC time: Mon 2018-03-26 09:06:55
             Time zone: UTC (UTC, +0000)
       Network time on: yes
      NTP synchronized: yes
       RTC in local TZ: no

    # Install watchdog package:
    - apt-get update && apt-get install watchdog

    # Check how the /dev/rtc* files looks now:
    - ls -l /dev/rtc*
      crw-rw---- 1 root root 10, 135 Mar 26 09:56 /dev/rtc
      crw------- 1 root root 251, 0 Mar 26 09:55 /dev/rtc0

    # The timedatectl is failing because dbus can not work with /dev/rtc file now
    - timedatectl status
      Failed to query server: No such device

[Regression Potential]
It looks like there is a bug in the watchdog package in Ubuntu which breaks timedatectl to work properly.

[Problem description]
The "postinst" script in watchdog package call "MAKEDEV misc" which remove /dev/rtc symlink and create "bad" /dev/rtc character device.

```
    if [ -x "`which MAKEDEV`" ]; then
            # do we have to create the device?
            if [ ! -c /dev/watchdog ]
            then
                (cd /dev; MAKEDEV misc || true)
            fi

            # do we have to create the temperature device?
            if [ ! -c /dev/temperature ]
            then
                (cd /dev; MAKEDEV misc || true)
            fi
    fi
```

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in watchdog (Ubuntu):
status: New → Confirmed
Petr Ruzicka (ruzickap)
description: updated
Revision history for this message
Lenin (gagarin) wrote :

can't reproduce with 18.04

Changed in watchdog (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Petr Ruzicka (ruzickap) wrote :

Confirmed...

It looks like this issue was already fixed...

Thanks

PetrR

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.