Bugzilla: Email::MIME::Modifier module is missing

April 11th, 2009

I have recently update FreeBSD system and have encountered a problem with Bugzilla 3.2.2 and perl 5.8.9

After running checksetup.pl I’ve got the message, that required module Email::MIME::Modifier is missing and script suggested me to install it with the following command:

/usr/bin/perl -MCPAN -e ‘install “Email::MIME::Modifier”‘

I did it several times, but nothing happened. After some digging I found that the real culprit is a missing dependency from Email::MIME::Modifier to Email::MessageId.

So, you have to run the following command:

/usr/bin/perl -MCPAN -e ‘install “Email::MessageID”‘

or I prefer to use ports:
mail/p5-Email-MessageID

And everything will be just fine.

FlexBuilder.ini is ignored under Vista

January 21st, 2009

Just bumped into another nasty bug. FlexBuilder under Vista ignores C:\Program Files\Adobe\Flex Builder 3\FlexBuilder.ini file.

It seems like due to Vista “smarts” with user directories, compatibility issues and general MS idiocy FlexBuilder have no idea where to pick up the FlexBuilder.ini file. It works perfectly well on XP, but not on Vista.
It also grabs all default JVM parameters twice for some reason. Kind of an Irish approach 🙂

Bug is submitted.

Binding to the members of the parent class

January 13th, 2009

This is not an obvious fact and this is not mentioned anywhere in the documentation: to bind to the member of the parent class both (child & parent classes) should be declared as [Bindable].

Here is the example:

public class Parent
{
public var m_sText:String;

public function Parent()
{
}
}

[Bindable]
public class Child extends Parent
{
public function Child()
{
super();
}
}
 

If you don’t specifically tell to compiler that class Parent is bindable, compiler will give you the infamous warning on the attempt to bind to any public member of the Parent class:

Data binding will not be able to detect assignments to "m_sText".

P.S. It is logical if you think about the meaning of the [Bindable] directive and and you know the fact that PropertyChange events is not fired for changes happened inside of the complex members.

Nissan Patrol wheel nuts torque setting

December 17th, 2008

As soon as I have biten by a 4WD bug a while ago, I ‘ve been trying to do almost everything by myself in servicing & maintenance department for my Nissan Patrol GU 3.0 Diesel ST.

I’ve got 2 sets of wheels – one set is BFGoodrich/AT – All-Terrains mounted on factory’s  alloy wheels and another set is BFGoodrich/MT –  Mud-Terrains mounted on steel Pro-Comp wheels.

Every time before a trip I change the wheels by myself, it takes the time, but gives a perfect opportunity to have a good look under the truck and check for any signs of rust or other problems.

Recently, it appeared that my exercising with weights finally gave the result. A little bit unusual though – when I last time changed the wheels, I over tightened the nuts, so the thread were nearly stripped off and I had to replace all the rear axle studs (which cost me a 3 digit figure).  Ouch!

I’ve been told by FerntreeGully Nissan that if I want to prevent this from happening in the future I have to use the torque wrench. It is also appeared that Patrol’s studs are very susceptible for the over & under tightening.

So, the whole idea of this post is this: Use the Torque, Luke!
Use the torque setting of 135 Nm or 100 ft-lbs for GU Patrol wheel nuts!

Flex popup window disappears if x or y becomes negative number with fraction

December 9th, 2008

There is a strange glitch in the Flex SDK – if you center PopUp window by yourself, then you should check that x & y properties are always casted to integer values.

If x or y coordinate becomes negative number with fraction, the whole popup window disappears.  This is strange as positive numbers with fraction are valid. And what is most frustrative, DesignView sets them with fractional parts when you re-arrange elements. 

 

UPD: bug submitted

Troubleshooting DELL SAS 5/iR RAID controller

November 28th, 2008

My first server was Dell SC1435. Well, the experience is always built on mistakes 🙂 I realised it when I’ve bought HP 360 G4p servers from my hosting company.  Now I know why HP costs more and why this is justified.

Well, I still have to live with a couple of SC1435s as they are still doing their job, not so good though. Each Dell server had problems with RAID on the 13th month after the shipment date (maybe it is hard coded in their chips?). I was a cunning fox second time, so I’ve bought additionally 3 year warranty for the next server. And this is already paid off, as one of the WD hard drives collapsed last Friday (for some reason these type of things are happening only on Friday arvos).

Well, first sign of problem was an mpt-status utility which reported RAID status DEGRADED, and HDD1 status FAILED, OUT_OF_SYNC. And after a couple of hours HDD1 changed its status do MISSING.

I thought that this problem is similar to the problem I had before, when RAID array just become unsynchronised for some reason, so I was looking for an utility which will allow me to start remotely RAID re-synchronisation process (rebuild). I was surprised to find that Dell provides only 2 types of utilities – for Windows and for RedHat Linux. Well, Linux is Linux, even if I don’t run RedHat and I hate it, there was a good chance that I will be able to run the executables under Gentoo.  First ominous sign was the size of the download – 44Mb, which is too much for an utility. When I unpacked it with rpm2targz I found that most of the contents is Java crap which uses GUI to handle the RAID.

I know that I am weird, but none of my servers are running Windows (M$ or X, does not matter). My concept is that server is something which could be managed via the smartphone & ssh. GUI is not an option for servers. They are sitting in the hot hell of data centre and every single piece of processor & memory resources should be doing the primary task – running Apache/database/you name it, but not the Java+X+KDE for occasional maintenance.

Well, my attempt to use Dell’s utility failed. I looked up the controller’s chip (LSI Logic 1068) and went on their site for help.  The idiocy is spread there as well. They had a CLI tool for RAID management, but is was for the superseded MegaRAID, not for SAS 5 i/R anymore. They have this RedHat/Java rpm to manage controllers. Damn!

I googled for a while and finally found sane people at IBM who use command line tool called cfggen to manage SAS 5 i/R RAIDs on their servers.
NB HP servers also have it, not online though.

Well, at that point of time I already faced a fact that the hard drive went hanky-panky and never came back, so cfggen could only display the RAID and HDD0 status and all attempts to start rebuild failed, as there was nothing to rebuild.

There was another option – to use BMC facility of the server. Because Dell servers come without documentation (well, there were unpacking instructions packed inside of the box), I had no idea that BMC is accessible via shared network interface, and there is no need to use DRAC (Dell Remote Access Card), which is actually unavailable for SC1435 due to the space limitations. So I even didn’t bother to setup BMC in BIOS.
(On the controrary, HP servers have iLO, which is implemented more thoughtfully – separate interface which could use a separate or shared network and they are shipped with tons of documentations in PDFs.)

So, on the next business day, i.e. Tuesday (remember, that it happened on Friday arvo? 🙂 technician from Dell changed the hard drive and RAID was back in business in a couple of hours.

So, what is the lesson I’ve learnt?

  • Use Nagios plugin check_mpt
  • cfggen from IBM website/ HP server utilities disk is a must for lucky Dell customers
  • Out-Of-Band access is something which should not be ignored.
  • think 3 times next time before buying Dell servers 🙂

TortoiseSVN uses root account to check-in

November 28th, 2008

Normally I prefer the command line tools over the tools with GUI. CLI usually means that interface is clear, simple and it could be wrapped up in the script and run automatically.

I worked with all mainstream source control systems, but Subversion is the one which still puzzles me after a year of use.  That’s why I prefer to use TortoiseSVN, which seems to me really great thing (not the Subversion itself though). It’s a pity that it exists only in Windows version.

Anyhow, I was trying to understand why when I’ve got source tree checked out under my username, TortoiseSVN checks in modifications using root account, instead of my username. Subclipse does not have this problem at all.

Then I found the answer in the TortoiseSVN FAQ:

Why is there no ‘author’ shown in the logs when I commit changes via svn+ssh?
Since SSH completely takes care of the authentication process, Subversion won’t even see the author who does the commit. So to tell Subversion an author you have to specify the author in the URL itself. E.g. svn+ssh://username@server.com. You should do that when you check out your working copy.

When I tried it, TortoiseSVN used my username. Perfect! But Subclipse went nuts. It started to think that the repostory URL is username@ssh+svn://host/repository or similar. I tried both PureJava & SVNKit implementations with no luck. Nuts!

“Will someone please think of the children?”

November 5th, 2008

“Will someone please think of the children?”
So says Helen Lovejoy in many episodes of the Simpsons, and so says our beloved Senator Conroy.
The problem in two words: to stop child pornography and protect children from the Evil Internet Government plans to set a filtering mechanism through all Australian ISPs, so they will filter out all illegal websites (sic!!!) .

Here is more to read.

Seems that we have at least one sane Senator though.

And further reading

ComboBox madness continues

October 28th, 2008

The saga with data binding problems in ComboBox component continues. The selectedIndex/selectedItem concept seems to be just undeveloped.

My previous fix has not covered all possible scenarios of the property assignment order. If you set dataProvider property it kicks out selectedItem/selectedIndex values. Here is attempt to make Combobox more conscious about its data.

package
{
    import mx.controls.ComboBox;
    public class SmartComboBox extends ComboBox
    {
        public function CSmartComboBox()
        {
            super();
        }

        /**
        *  bind to this property instead of selectedItem
        */
        private var _selectedItemEx:Object;

        public function set selectedItemEx(value:Object):void
        {
            _selectedItemEx = value;
        }

        public function get selectedItemEx():Object
        {
            return _selectedItemEx;
        }

        /**
         * This method fixes the nasty bug in ComboBox
         * If value is null, it tries to find in dataProvider, can't find it, so it leaves controls as is it is,
         * instead of resetting it.
         */
        override public function set selectedItem(value:Object):void
        {
            if (value == null)
            {
                //first check if our real selectedItem is set
                if (_selectedItemEx)
                {
                    //assign real value
                    // NB if _selectedItemEx contains invalid data, setter from the parent class
                    //will ignore the value and set the property to null.
                    super.selectedItem = _selectedItemEx;
                }
                else
                {
                    //reset the control
                    super.selectedIndex = -1;
                }
            }
            else
            {
                super.selectedItem = value;
            }
        }
 

        /**
        * After dataProvider assignment, restore real selectedItem
        */
        override public function set dataProvider(value:Object):void
        {
            super.dataProvider = value;
            //after assignment, restore real selectedItem
            //NB this is still safe, as setter check the value against the dataProvider
            super.selectedItem = _selectedItemEx;
        }


        /**
        *  reset control (-1) only if real selectedItem is null
        */
        override public function set selectedIndex(value:int):void
        {
            if (value == -1)
            {
                //reset only if we don't have a saved value!
                if (!_selectedItemEx)
                {
                     super.selectedIndex = value;
                }
            }
            else
            {
                super.selectedIndex = value;
            }
        }
    }
}

Looking closely at setters & getters

October 27th, 2008

AS3 has a mechanism for defining setters & getters for the member variables (pardon, properties).

private var _property:uint
public function set property(value:uint):void
{
    _property = value;
}
public function get property():uint
{
    return _property;
}

Recently, I’ve bumped into the the strange thing: if you change directly the value:

 _property = 17;

this won’t generate propertyChangeEvent and all you bound variables won’t be notified about the change. So, instead when you need to notify others about the change, you have to do this:

 property = 17;

This will cause the setter to be executed and propertyChangeEvent will be dispatched.