Blog of Sylvain Le Gall - CommentsDebian and OCaml news2020-05-22T23:55:36+02:00Sylvain Le Gallurn:md5:5e59858b9770edef41f3c8a540c2fce7DotclearOUnit 2.0, official release - Thomas Leonardurn:md5:5252b351d693f6a06fb8435f74955c1c2013-10-14T14:57:59+02:002014-06-05T22:22:26+02:00Thomas Leonard<p>Thanks - that fixed it! I now set each variable to a known value ("/XXX") right at the start, and then restore it to that value after each test.</p>OUnit 2.0, official release - gildorurn:md5:7def2e5b6a0fe95ac28f191eebb233a52013-10-14T11:36:27+02:002013-10-14T10:36:41+02:00gildor<p>To avoid the problem with modifying environment, you should set your variable (GNUPGHOME) back to its original value.</p>
<p>I recommend to create a bracket for that (with setUp setting the variable and tearDown restoring it) and also take a lock with process scope in the setUp and release it in the tearDown (because the putenv change only the process env). Look at source code of oUnit/src/oUnitBracket -> bracket_chdir function which is doing almost the same kind of change but for chdir. The part with the lock will not work for oUnit1, so you may skip it as long as you are running using ounit1 (because we restrict ounit1 application to not run with runner = processes or threads).</p>
<p>If you don't yet want to do the change, consider filling a bug against ounit to change the behavior when running ounit1 and don't warn about this.</p>OUnit 2.0, official release - Thomas Leonardurn:md5:247f38be939f6a6fa3abc9f5da06bd2d2013-10-14T11:07:58+02:002013-10-14T10:29:03+02:00Thomas Leonard<p>"make sure that you don't change global process state like chdir or Unix.putenv"</p>
<p>My tests do this (e.g. I set GNUPGHOME to a temporary directory to make sure the test doesn't affect the user's real GPG).</p>
<p>Now my tests fail with "Environment (check env)". How should I fix this?</p>
<p>(note that the tests must still work on OUnit 1 systems, so I can't use any new APIs)</p>
<p>Thanks,</p>OASIS website updated - gildorurn:md5:3a65b6f724d1b4b2d4a7370a20b817ee2013-08-19T12:32:22+02:002013-08-19T11:32:45+02:00gildormcclurmc, thanks for the head-up. The pages are missing, I need to fix that and add some dead-link checker.Augeas tips and tricks for Puppet user: edit a complex node. - michal.bryxiurn:md5:d2cddedb2188db368ec549036b46a0832013-08-19T09:30:20+02:002013-08-19T11:33:20+02:00michal.bryxi<p>Hey, this is great solution. I always used this last() trick. But this is definetelly way better. Augeas always looked to me like some sprt of dark magic.</p>OASIS website updated - mcclurmcurn:md5:5534e5c3dab78a33c1ebae2cc94d4eff2013-08-17T17:19:25+02:002013-08-19T11:32:45+02:00mcclurmc<p>The links to oasis2debian, oasis2opam, and godi at the bottom of the home page seem to be broken.</p>
<p>Thanks for the great software!</p>OASIS website updated - gildorurn:md5:8f1a9fc4f8d41ebe1097b06d6afbde672013-08-17T15:03:09+02:002013-08-17T14:03:18+02:00gildor<p>Thanks jim. I need to check what background color should be ok. </p>OASIS website updated - jimurn:md5:f40bb0f19fe9bf447ee294b53871a8732013-08-17T04:38:29+02:002013-08-17T14:01:29+02:00jim<p>Just FYI: on a black background like my RSS reader, the oasis logo is unreadable</p>Sekred a password helper for puppet. - gildorurn:md5:ac18670cd0f7c368ea68d8043d036e972013-04-10T13:51:02+02:002013-04-10T12:51:08+02:00gildor<p>+choonming:</p>
<p>Following your advice, I had a look at Hiera. It seems to indeed cover part of what sekred do. It miss the "generate only on the host" and you'll have to inject the password at some point in the DB (although you can probably create a dedicated backend for that). </p>
<p>Although, I mainly target Debian and puppet 3.X is only part of experimental (not even unstable). So hiera is at least 1 or 2 year away from my day to day usage.</p>
<p>Anyway, thanks for the valuable pointer.</p>Sekred a password helper for puppet. - choonmingurn:md5:54c46a1946e7cee33fc44a16671da3942013-04-07T05:22:26+02:002013-04-10T12:47:09+02:00choonming<p>I'm not sure whether you are aware of this but Puppetlabs have integrated hiera with the latest Puppet 3 codebase.</p>
<p>It is very similar to what you are trying to achieve here but only better since its already built in with Puppet. Furthermore you can secure the hiera data directories with hiera backends like hiera-gpg.</p>
<p>Just my 2 cents</p>Sekred a password helper for puppet. - gildorurn:md5:b873a2e2aa96aadfcc3256db86e9d5662013-04-05T23:26:44+02:002013-04-06T00:17:43+02:00gildor<p>Np237:</p>
<p>The GnuPG idea is nice. Sekred is aiming 2-tech levels below that (i.e. no encryption and no FTP push). I think your solution is more secure but needs more stuff to configure...</p>
<p>Your solution has another problem, with regard to one of the example: setting a password for root@mysql. I use the generated root password to create other user and DB. If you encrypt the password for a GPG key, I suppose you cannot read it back on the target node?</p>Sekred a password helper for puppet. - Np237urn:md5:8b4578add6ff615e54ecf468a1dbf9332013-04-05T18:16:30+02:002013-04-05T22:18:30+02:00Np237<p>At work we use a different scheme: we push a GnuPG public key, the password is generated on the target node, encrypted with that key, and pushed to a FTP server.</p>
<p>You can extract the password at the time you actually need it (which is, not often).</p>Always test your HD first - gildorurn:md5:fa608a20b5d06704572426cc39818c732013-03-23T21:05:51+01:002013-03-23T21:06:04+01:00gildor<p>On this HD + the USB adapter I use, SMART didn't work for this error. So I suppose SMART doesn't always work on USB (maybe on high-end USB adapter, but I think you should not rely on standard USB adapter for that).</p>
<p>And good news: I get the replacement yesterday and was able to fully check it, no errors.</p>Always test your HD first - andrewurn:md5:e8059a6ee5f150bc6d32af6ca071b0462013-03-23T17:42:29+01:002013-03-23T21:03:28+01:00andrew<p>So far I never received any broken harddisk when newly bought, but shit happens anyway.<br />
I have been using smartctl before, too. And recently I found, that this probably does not work, when connecting the drive via USB-adapter to your computer. Again this is just guess-work, it is also possible, that the old Fujitsu IDE-notebook-drive simply does not suppoert SMART at all, I have no way of re-checking this right now.</p>Always test your HD first - gildorurn:md5:40e1433c741dcd4728f1955f265b5e372013-03-08T19:32:08+01:002013-03-08T19:32:15+01:00gildor<p>+Sidicas, I agree on the fact that it is not THAT important and that the drive should "cope" for a moment with it. Also if the drive is still under warranty and you don't need it badly ASAP, you should return it to the manufacturer. This kind of damages are covered by the warranty and you should take advantage of it. When the drive is not anymore under warranty and that some bad sectors appears, that's ok to stay in this situation for a couple of months (which is what happens to me right now).</p>
<p>Although as you told, the sectors could have been damaged during transit, but what if it is not the case? What if the drive is really defective? Will you wait 1 month to see the increase and loose the 14 days return warranty? </p>Always test your HD first - Shnatselurn:md5:ba6fbdaa65619f4b0a551a0147b3a8c32013-03-08T17:51:12+01:002013-03-08T19:22:21+01:00Shnatsel<p>GNOME Disk Utility (aka palimpsest) also monitors hard disk state and notifies you if it's about to fail. Many distros ship it by default. It's handy.</p>Always test your HD first - Sidicasurn:md5:d6c35084451483ff02826e7639b700da2013-03-08T15:42:04+01:002013-03-08T19:22:21+01:00Sidicas<p>On modern hard disks, it doesn't matter if they have bad sectors out of the box or not. What matters is whether or not the bad sectors is increasing. You could have gotten a drive that might have been slightly damaged in transit, but the hard disk firmware will automatically detect it and relocate those bad sectors.. So it's generally not a problem. I've bought hard drives with bad sectors out of the box and the drive lasted 8 years. Bad sectors does not mean a drive is defective or will fail anytime soon. Only if the bad sectors count continues to increase with use does it indicate a failing drive.</p>Always test your HD first - Roburn:md5:7098e007adb7448b917292e01403e05d2013-03-08T13:05:19+01:002013-03-08T14:52:01+01:00Rob<p>Losing is spelled l-o-s-i-n-g.</p>Always test your HD first - gildorurn:md5:61674d94060ff55d39b4c7a8d54489542013-03-03T21:06:51+01:002013-03-03T21:07:01+01:00gildor<p>+Marius Gedminas:</p>
<p>''smartcl -t long'' are nice to do test. But they are a little harder to setup. Let say that they are the 2nd level when configuring smartmontools.</p>
<p>I will however still run ''badblocks'', this is a more direct diagnostic tools: failing blocks or no failing blocks. And contrary to all SMART analysis, the result is easy to read (you need to do at least 1 or two Internet search to understand the result of a SMART test). </p>Always test your HD first - rjcurn:md5:50c079b63e3fa4193ebaf630a47f4fb22013-03-03T11:46:40+01:002013-03-03T21:01:44+01:00rjc<p>Hi,</p>
<p>If it takes a while to test the hard drive I'd use "-F" instead of "-f" with tail.<br />
Personally I got into the habbit of using it every time, unesll there's a reason not to :^)</p>
<p>Regards,</p>
<p>Raf</p>