[Bug 1758911] Re: Watchdog package is messing up the /dev/rtc file causing timedatectl to fail

Launchpad Bug Tracker 1758911 at bugs.launchpad.net
Mon Mar 26 13:14:43 UTC 2018


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

** Changed in: watchdog (Ubuntu)
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to watchdog in Ubuntu.
https://bugs.launchpad.net/bugs/1758911

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

Status in watchdog package in Ubuntu:
  Confirmed

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.

  
  [Fix]
  The proper way how to fix is to modify the postinst script in watchdog package and replace all 
  "MAKEDEV misc" with proper values.

  ```
      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
  ```

  to

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

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/watchdog/+bug/1758911/+subscriptions



More information about the foundations-bugs mailing list