FS#15858 - [initscripts] adjtime doesn't work in a OpenVZ template

Attached to Project: Arch Linux
Opened by Henk van de Kamer (hvdkamer) - Saturday, 08 August 2009, 13:04 GMT
Last edited by Roman Kyrylych (Romashka) - Saturday, 03 October 2009, 14:01 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Arch Linux can be used as an OpenVZ (Virtuozzo) tempalte. However this requires a few tricks. Yesterday with the initscripts (and possible the udev as well) another issue was discovered. Every hour an e-mail is received with the following content:

Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.


The problem is that OpenVZ templates can't set the hardware clock. That is the reason that udev doesn't create the rtc0.


Additional info:
udev (141-3 -> 141-5)
initscripts (2009.03-2 -> 2009.07-3)


Solution:
Detect on installing/upgrading if we are running as a container. If so, remove the adjtime from cron.hourly. The detection is something like this:

[root@ve180 /]# if [ -e /proc/user_beancounters ]; then echo "OpenVZ"; fi
OpenVZ
This task depends upon

Closed by  Roman Kyrylych (Romashka)
Saturday, 03 October 2009, 14:01 GMT
Reason for closing:  Implemented
Additional comments about closing:  see the last comments
Comment by Gerardo Exequiel Pozzi (djgera) - Saturday, 08 August 2009, 17:20 GMT
  • Field changed: Task Type (Bug Report → Feature Request)
  • Field changed: Summary (adjtime doesn't work in a OpenVZ template → [initscripts] adjtime doesn't work in a OpenVZ template)
  • Field changed: Status (Unconfirmed → Assigned)
  • Task assigned to Thomas Bächler (brain0), Tobias Powalowski (tpowa)
This is like when you start Arch Linux under User Mode Linux, there are many IOCTL that are unsupported under this enviroment.
I think that in these cases, the best is customize your instalation.
For example, some days ago I proposed this, that is ideal for UML or others type of setups (for example minus nr of consoles): " FS#15715  - [initscripts] Make dynamic initilization code for consoles", but not more than this, in this case, not "specific code" is added.
Comment by Henk van de Kamer (hvdkamer) - Monday, 10 August 2009, 09:08 GMT
I don't know how much tweaking is needed under UML. The above is the first I had to change for a default installation under OpenVZ, so it should be possible to incorporate this in the post-install scripts. Because now every time the package is upgraded I probably get this one back? Customizing is an option, but only if it is the opinion of the Arch Linux community that virtualization is something which is not supported. And that would be a very wrong decision IMHO :-). Most distributions try to run in as many environments as possible...
Comment by Aaron Griffin (phrakture) - Thursday, 24 September 2009, 21:42 GMT
Umm, this is just an hourly cron job than can be disabled.

$ chmod -x /etc/cron.hourly/adjtime

Comment by Thomas Bächler (brain0) - Thursday, 24 September 2009, 21:57 GMT
You can also disable clock setting in rc.conf now.
Comment by Aaron Griffin (phrakture) - Thursday, 24 September 2009, 22:05 GMT
With these two additions, this should be closable. I do both of these steps on my slicehost slice (Xen based), which has similar issues

Loading...