Monday, January 25, 2010

IICM

Lots of people ask me what is my current role in VERINT (twitter / facebook), well actually for couple of month now i am leading the Installation, Integration, Configuration and Monitoring  team that its target is to create the entire package of our solution using built in bootstrapper / Chainer and on the other end to do the development of the configuration and monitoring infrastructure (without too much details – although i can talk for hours)

The team is built out of 6 more team members other than me and i am currently in search for two more developers (so if you know good developer email me <SMILE /> )

I am working at VERINT for more than 6 years now and my previous roles were Software Architect, Web Application / Reports Team Leader and Web Developer

Hope this finally answer that question, I wonder what the future holds :)

Sunday, January 24, 2010

using apache as load balancer (with his own cookie)

Yesterday with the help of my friend Alex Koltun we had a task to configure apache as a load balancer, we had two nodes that listen on port 80 10.161.205.66, 10.161.205.175.

we started with trivial configuration of mod_proxy_balancer that have the two nodes declaration and setting of a cookie to be used as the key for the route algorithm (soon to understand we were partially mistaken)

<Proxy balancer://mycluster>
BalancerMember http://10.161.205.66:80 route=node1
BalancerMember http://10.161.205.175:80 route=node2
</Proxy>

ProxyPass / balancer://mycluster/ stickysession=MYCOOKIE
ProxyPassReverse / balancer://mycluster/ stickysession=MYCOOKIE

<Location /balancer-manager>
SetHandler balancer-manager

Order Deny,Allow
Allow from all
</Location>

We tried browsing but that didn't work!!! after searching for some 30 minutes and multiple retries we found the solution that apparently apache except the sticky session cookie to be in a special format that actually tells it which node to choose (it doesn't have auto associating for that), the format of the value should end with .{route name}

This enables you to set on the node you are working the cookie , but we didn't want to change each node and rather have apache do it (because it already did the job of balancing so simply persist it)

The solution was simply adding header manipulation (with mod_headers):

Header add Set-Cookie "MYCOOKIE=SOMEVALUE.%{BALANCER_WORKER_ROUTE}e; path=/;" env=BALANCER_ROUTE_CHANGED

This actually set the cookie using the selected root only if root chosen and used is changed

pretty slick ha ?

Solution was based on this forum answer

The basic assumption that apache uses the cookie as the key to an internal map of key and route was mistaken although for some reason this was the trivial assumption, because we try to do thing so complex while the solution is so simple. still i would except that this would be found on the first page of mod_proxy_balancer

Enjoy and i guess this should save you at least 1 hour of “balancing”

Full httpd.conf file here

<Update 26-Jan-2010 19:41>

I add ProxyPassReverse also to make sure the redirects are also replaced wit correct value

</Update>

My new Seagate BlackArmor 110 NAS – 2tb external disc

Just bought new external storage from Seagate called BlackArmor 110 NAS (price in Israel and USA is the same <smile /> ),

It works very good (LAN) with intuitive web interface and includes user / folder management with media streaming also

Although it has download manager that support HTTP / FTP, it is very basic and doesn't support basic HTTP tricks that sites do, i am trying to download straight from the box using MSDN but i cant do it…. (HELP)

somehow my wireless network only enables me to move 2.3MBPS (byte not bits) –> SLOW

Friday, January 22, 2010

Virtual PC –> VM Player (VMDK) –> Hyper V(VHD)

Few facts:

  • VM Player support working with Virtual PC files (it convert them automatically to VMDK)
  • Hyper-V doesn't support working with VMDK

The story is that we had few VPCs that ran our build machines on one server with 4 cores, sadly VPC doesn't leverage more than one CPU of the host :(, so we went to VMPlayer which run each VM in it sown process and leverage more than one CPU – all was working almost great for few month.

Now we have Hyper V so we wanted to move those VMs to it, but Hyper V doesn't support out of the box converting of VMDK to VHD

There is a tool called VMDK2VHD that should do the trick but sadly on the converted VMDK (from VPC) it has some difficulties saying corrupted files!

Before you decide to create new system and install everything again i have a suggestion, use DISK2VHD from sysinternals to create a VHD file from within the guest while it running coz its using VSS

I will check it on Sunday (but why shouldn't it work)

Tuesday, January 19, 2010

Blogged and after 1 min its on Google – Damn they are fast

Amazing i just published a post about “Cannot add external manifest for executable after it was running once”, and i saw that after one minutes it was already searchable on Google ,…. hhhhahaaaa Google owns Blogger :) very good decision.

Cannot add external manifest for executable after it was running once

i will stat by complaining and than continue, i wasted today more than 1 hour while trying to add external manifest for a VB6 application that needed to require elevation, it simply didn't work.

The flows was as such, i connected to a system to investigate why the application is not working correctly on Windows 2008 R2 with UAC on. i have identified that the issues related to that process is running under the standard token and not admin.

I created external manifest file and nothing helped it simply didn't ask for elevation so i did million of things:

  • change version
  • changed names of the process (couple of times) in XML
  • Change version of schema in XML

After 1 hour and few emails, i decided to lay back, drink and rethink,…. + search more on Google and suddenly i found few places that describe the internal behavior of windows – actually windows caches the application context (manifest) on the first time , so in my case i ran the application that didn't have external manifest and it was cached as none , than i added manifest but it was already cached and that was the reason NOTHING CHANGED!!!

so the solution is simple(one of the following):

  1. Embed the manifest in executable
  2. Touch the executable after adding manifest (only if you ran it)

This post should save you LOTS of time <Smile />

Sunday, January 17, 2010

Beware of the context in XPATH

I work a lot with XPATH (but i am not an expert yet), during my work i came across a very non intuitive situation for, the thing i wanted to do is to return the first item out of all the children in the document so i used [1] and apparently i got more than one results.

Consider the following XML:

first

Lets say i want to get the first Book on the entire document, i used the following XPATH and it gave me the following output (2 items)

second

Apparently i needed to take in mind the context that Book can be found under and do the followingMezer_01-18_06-32-39

So although i understand the solution, this was not the intuitive one,….  (watch it)

Microsoft Releases "System State Analyzer Tool" for Windows 7

Long ago i used System State Analyzer from Microsoft to find difference between two state of a machine, mainly in support area (rather than development).

The tool enables you to see differences of two snapshots of a system or even different systems on the following areas:

  • Registry hives (HLKM, HKCU, HKCR, etc)
  • Disc changes (C:, D: ,etc)
  • Services
  • Drivers

I must say that the previous version was SLOW, and as it seems this one is also suffering from slowness

By the way this utility is distributed by the Windows 2008 R2 Logo Software Certification and Windows 2008 R2 Logo Program Software Certification toolkits

You can download x86 and x64 versions

Screen shot of left side of main page

SAAnalyzer

 

Enjoy

Tuesday, January 12, 2010

Hyper V initial steps are almost impossible without guidance

I have been struggling (here and there) on connection issues to my Hyper V server  for more than week (Not Net)

Main problems are:

  • Cannot connect to VM (console) – keep asking for user / pass
  • Cannot add VM that create new VHD
  • Cannot connect to Hyper V management (should be first issue)

The only partial solution i found is to add local admin on the the Hyper V and connect using it , all other option failed on authentication issues and other WIERD

There is a thread on all those issue which I am following and i guess you should also

In a nutshell Microsoft did great job on the Hyper V solution BUT failed on the enablement of it ! (although i will keep using it :), Microsoft should act NOW and provide deep review of the process before people will run back to ESX / Virtual BOX)

The usage of WMI / distributed COM is a wrong decision which will be the main problems in the Hyper V solution for IT people.

Friday, January 08, 2010

Installing TOMCAT as a service pitfall

Installing TOMCAT is relatively easy - xcopy deployment BUT when you want the TOMCAT to be running as a service the most common way to do it is to run several batch files that configure the service and add it. Before you jump i am not using the OOTB Installer provided because i want to do custom closure

While this is relatively "simple", its bad practice to use such custom actions (require handling of rollback and uninstall, batch problems).

I am going to do something that i dont really like, i am going to suggest a solution while implementing it later this month

  1. Install the service using the batch files using all your required options
  2. Goto the relevant registry key (apparently the entire configuration is saved in registry - lame as i would expect this to be file based configuration) and Export it to Reg file (static i know)
  3. Create a WiX fragment using that registry and update all static parts to be dynamic based on properties or other cool features (e.g. Location of JRE, Memory limit, etc)
  4. In your main product WiX add that fragment and add Install Service action (native) that will add the service (Make sure to use the correct service name as used in the configuration)
The above steps are native actions that dont depend on executions which means they are almost bullet proof and support out of the box rollback + Uninstall and repair
I know this looks hard, but it should be simple. also i can make it even more advance and wrap the extraction of the registry to a task of the heat + XSLT for the dynamic part

HP Sizer For Microsoft Windows Server 2008 R2 Hyper-V

Last month I bought some monster server to hold our virtualization infrastructure, for that i consulted with internal team we have in our company because i know little on that subject of hardware.

We got the server and damn it fast <Smile />, the issue is that apparently the BOM included also 2 card for external storage (fiber) which are useless because i am using internal array of 8 discs (the cost is 600$$$), Hope i can redim the cards

Yesterday one of my team members sent me a link to HP Sizer For Microsoft Windows Server 2008 R2 Hyper-V, this is a great tool that enables you to describe the kind of configuration you are going to run on the virtualization infrastructure and some more constrains (like memory, etc) and it will produce ready to order BOM

I checked it using our spec and it gave a very good spec + bill (remember i don’t know too much in that area but it did the job good)