Svn aborted commits remains in conflict

Friday May 28thUncategorized Category

I use svn on daily basis. everything was ok until today when a new this kind of error popped up :


root@tfm33: /Space/server/_wks/trunk# svn commit
svn: Commit failed (details follow):
svn: Aborting commit: '/Space/server/_wks/trunk/libmp3lame' remains in conflict

An no matter what i tried it stayed in conflict. doing some google-ing i found out that the fix is quite simple:


svn resolved /Space/server/_wks/trunk/libmp3lame

Linux Kernel where is going

Thursday April 15thUncategorized Category

At Linux Foundation Collaboration Summit 14 April 2010 it was a very interesting session on Q and A about linux kernel. Here are the main ideas discussed:

1) Documentation (lack of) – The documentation itself should be inside the kernel itself.

2) Need for new blood . Some of the original developers are getting old.

3) Keeping Independent thinkers is very important.

4) Fixing scheduler is around the corner. RTT will be merged into kernel.

5) Android is forking a part of kernel. There will be tries to merge codes between Google and Linux Kernel.

6) A person ( or persons ) are needed to reduce the kernel bloat ( kernel foot print )

Upgrading HP c7000 blades

Thursday February 18thUncategorized Category

It comes a time when you need to update the ILO firmware / bios rom / OA firmware on a C7000 enclosure.

Best way to do this is like this:

  • Download OA firmware, ILO firmware and rombios ISO image .
  • From the web interface update ILO firmware.
  • Create an ILO user and enable ssh .
  • Activate ILO advanced license
  • Open a terminal and ssh to ilo
  • issue the following command from ilo command line:
vm cdrom insert http://192.168.1.1/ROMPAQINTEL.iso

vm cdrom connect
power on

  • From web browser open an ilo remote console to server and power it off.
  • After the server gracefully powers off issue a “power on” command from ILO
  • Switch to remote console and complete the update
  • After update is complete issue the following commands from ILO

power off
vm cdrom eject
power on

Enjoy updating.

Adventures with Cisco 7945 Phone

Friday December 18thUncategorized Category

I recently got a Cisco 7945 Phone to play with.
1) I got it out the box , i connected it to my LAN and plugged in the power.
2) The phone started to send requests to my DHCP server . However it never stopped doing that.
Dec 17 21:54:11 localhost dhcpd: DHCPREQUEST for 172.17.1.13 from 00:1f:ca:ea:11:73 (SEP001FCAEA1173) via eth1
Dec 17 21:54:11 localhost dhcpd: DHCPACK on 172.17.1.13 to 00:1f:ca:ea:11:73 (SEP001FCAEA1173) via eth1
Dec 17 21:54:14 localhost dhcpd: DHCPRELEASE of 172.17.1.13 from 00:1f:ca:ea:11:73 (SEP001FCAEA1173) via eth1 (found)

3) A quick search on the net on how to set this phone up ( in the box I found no documentation so i guess google il my friend tonight ) revealed that i need to set up a tftp server to serve a software for the phone.  But to get the software i will need a Cisco account.

Great ( NOT ) … In order to download from Cisco you will need: “Have a valid Technical Support Services Agreement”

Now i have to wait a bit until my friend who has the account will download it for me. Time to get something to eat. This is going to be a loooooooong night.

Got the file. One big zip unpacked in tftp directory. Created a file named: XMLDefault.cnf.xml

4) got the files. DHCP server updated …

class "cisco7945"
{
match if substring (option vendor-class-identifier,0,32) = "Cisco Systems, Inc. IP Phone CP-";    #<----Matches first 32 characters
option tftp-server-name "172.17.0.1";
}

5) Press # while plugin the power and then “123456789*0#” to enter the upgrade sequence.

6) At this point the phone will request from tftp a file named : term45.default.loads

7) The phone is quite bricked. Requesting something via UPNP and there you go … another brick in the wall.

8) After 1 day of intense internet  searching  i found out that SIP45.8-5-2S was the the one firmware to go with. Worked like a charm.The firmware loaded as expected so the phone is now SIP.

9) Time to make it talk to yate. This is much more difficult than i expected. I have a small yate instalation here and usually i’m connecting to it with Xten clients .I added a number and a password for cisco phone ( from freesentral ) but at this point i’m stuck at registering. It doesn’t wat to register to yate.

I guess it will be at least another day of searching.

DRBD is finally in kernel

Monday December 14thUncategorized Category

DRBD refers to block devices designed as a building block to form high availability (HA) clusters. This is done by mirroring a whole block device via an assigned network. DRBD can be understood as network based raid-1.
Today i happily found that DRBD was added to the upcoming linux kernel 2.6.33. Until now TFM could support DRBD but sometimes it got obsolete or we had lots of compilation problems because we are keeping up to date to kernel tree and DRBD was a little slow when big changes appeared in kernel.
In the next few days we will prepare and add to TFM some ready to use examples regarding DRBD.
Ralink’s RT2860 drivers and support for RT3090 PCI Wi-Fi chips were also added to the kernel. As usual around Christmas there are a lot of developments in Linux World.

Bonding in tfm

Friday November 27thUncategorized Category

Finally we added support for ip bonding in tfm. How a config will look like?

In  /etc/sysconfig/network-devices directory  create a directory named ifconfig.bond0 with the following content:

ONBOOT=yes
ONHOPLUG=yes
SERVICE=ipv4-bonding
IP=192.168.1.1
PREFIX=24
BROADCAST=192.168.1.255
CHECK_LINK=no
BONDING_SLAVES="eth1 eth2"
BONDING_MODE=4
BONDING_MII_DELAY=100

Performance monitoring best practices

Thursday November 5thUncategorized Category

When you design a servers performance monitoring system there are several things that you will have to consider. Best practices when implementing such systems are:

  • Set up a monitoring configuration
  • Keep monitoring overhead low
  • Centralized place for monitoring
  • Analyze performance results and establish a performance baseline
  • Set alerts
  • Tune performance
  • Plan ahead

When setting up a monitoring system you have to consider what kind of system is “good enough” for you. You will have to decide if you go with an opensource monitoring system or if you go with a commercial system. Since i’m not a fan of commercial closed source system i will focus on opensource solutions:

  1. Nagios - Nagios is a powerful monitoring system that enables organizations to identify and resolve IT infrastructure problems before they affect critical business processes
  2. Cacti – Cacti is a complete network graphing solution designed to harness the power of RRDTool‘s data storage and graphing functionality. Cacti provides a fast poller, advanced graph templating, multiple data acquisition methods, and user management features out of the box.
  3. Munin – Munin the monitoring tool surveys all your computers and remembers what it saw. It presents all the information in graphs through a web interface. Its emphasis is on plug and play capabilities.

Nagios has the advantage that it can be set up to send SMS alerts to predefined groups of users in case of alerts. Cacti has the advantage that you can evaluate in time how your systems performs and you can have a good ideea of the trends. Munin can monitor certain aspects better than Cacti but is more invasive on the systems you install it on.

Next thing will be to keep the monitoring overhead low. This can be done by :

  1. Don’t query the servers too often.
  2. Monitoring system should be tun on a standalone server that does monitoring and nothing else.
  3. Archive unneeded data.
  4. Use asynchronous requests when possible

On previous point i said that monitoring system should run on a standalone server . This means exactly Centralized place for monitoring .

Ideally, all logs from different areas of monitoring should be stored in a centralized place where one UI can be used to analyze the data. Based on your user scenarios, consider identifying which teams to partner with, so log data can be viewed as a coherent whole. The reasons behind centalization are:

  1. You can easy implement a strict user control / user policy / procedures ( You will need it if you need  Sarbanes-Oxley compliant )
  2. Minimize the admin time. Imagine that you have 20 servers and each one with it’s own monitoring system.
  3. Giving access to some users on relevant graphs / logs is easy
  4. You can get an overview on the whole system

After you implemented the system and data starts to pile up you can do an analysis of performance results . This should be done as often as possible in order to identify trends and also to catch “exceptions”. For example at the end of each month servers that runs accounting will have increased load than on a normal day. If you do not pay attention you might find yourself in pretty delicate position when users requests more capacity or more processing power and acording to trend it wasn’t necessary.

After getting a base line for the performance you can Set alerts for moments that systems behave out of the ordinary or for problems with the system. For example if a server uses 15G RAM out of 16G RAM you might want to be notified about that to schedule a downtime to add more RAM or to see what is going on with the applications running on that server.

Performance tunning is a delicate job and take an awful lot of time. Because a system can be optimised acording to a scenario. If the data doesn’t fit in that scenario you might need to adjust servers parameters in order to adapt to the scenario. Databases, apache servers, kernel parameters can be tuned to suit your needs.

Also the baseline and graphs of the performance allows you to Plan ahead the evolution of your systems. For example you can predict with good acuracy when or if your will need to purchase new hardware or when you will need to upgrade your existing systems.

Adding Oracle support to PHP

Thursday October 15thUncategorized Category

If you want to connect to an Oracle database with PHP you will need the pecl module named oci8

First in order to compile it you will need Oracle Instant Client ( both basic & sdk ) . You can download them from here:

http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html

If you don’t have an Oracle account you will need to create one.

At the time of this post the following files are available: instantclient-basic-linux32-11.2.0.1.zip , instantclient-sdk-linux32-11.2.0.1.zip .

Create a directory in /opt  mkdir /opt/oracle/instantclient and copy those files there . Then unzip them . You will need to create a symbolic link ln -s libclntsh.so.11.1 libclntsh.so

Then you will need to install libaio if you don’t have it already . Don’t forget to add /opt/oracle/instantclient/instantclient_11_2 to /etc/ld.so.conf .

At this point you are ready to install the pecl extension to php.Create a temporary directory ( /tmp/1 ) and cd there.

mkdir /tmp/1

cd /tmp/1

pecl download oci8

tar xf oci8-1.3.5.tar

cd oci8-1.3.5

phpize

./configure –with-oci8=shared,instantclient,/opt/oracle/instantclient/instantclient_11_2

make

make install

edit /etc/php.ini and add

extension=oci8.so

And enjoy oracle extension for php. Note: if you have apache running restart it.


Finding what mac is on a Cisco port.

Tuesday October 6thUncategorized Category

From time to time i need to know what mac is on a cisco port. This is a reminder on how this is done:

sh mac-address-table interface <Interface>


New CMS needed for tfm.ro

Tuesday September 29thUncategorized Category

tfm.ro needs a new face. in the beginning we started with an inhouse mini CMS. Then we switched to mediawiki and focused on end user documentation and howto. At this point we use wordpress with Structure theme .

What is not ok:

  • Community options are limited
  • User generated content is limited to comments
  • Integration with the development site is done only via an RSS feed
  • Looks old and dusty
  • We focus on development and by doing this the site is most of informations are old and sometime obsolete

So ,  i’m begining to search for an alternative that will have to provide:

  • community options ( registration , posibility to upload pictures , patches , docs etc )
  • bug tracker integrated with the main site
  • online manuals creation / gathering
  • forums

Do you know what options are out there ?