[one-users] host with both tm_ssh and tm_lvm

Shi Jin jinzishuai at gmail.com
Tue Nov 10 11:32:29 PST 2009


> That is the problem. I think you can solve the problem this way:
>
> * Copy $ONE_LOCATION/etc/im_kvm to im_km2
> * Set in im_kvm2/im_kvmrc IM_REMOTE_DIR to other directory (you can
> simply add "2" to the name of the dir
> * Add another im like the one you have but using this new config files:
>
> --8<------
> IM_MAD = [
>      name       = "im_kvm2",
>      executable = "one_im_ssh",
>      arguments  = "im_kvm2/im_kvm.conf" ]
> ------>8--
>
> * Use im_kvm2 for the duplicated hosts
>
Thanks a lot.
I think this is a good solution.
Just one question: the  IM_REMOTE_DIR variable in im_kvmrc does not
seem to have any effect.
The default is
#IM_REMOTE_DIR=/tmp/ne_im_scripts
But I found the scripts are actually located in /tmp/one-im
This I can understand since we have the code in lib/mads/one_im_ssh.rb:
202 remote_dir = ENV["IM_REMOTE_DIR"]
203 remote_dir = "/tmp/one-im" if !remote_dir

However, after I changed in the new im_kvmrc:
IM_REMOTE_DIR=/tmp/one-im-kvm
It does not take effect.

I then realized that in im driver,
IM_MAD = [
      name       = "im_kvm_lvm",
      executable = "one_im_ssh",
      arguments  = "im_kvm_lvm/im_kvm.conf" ]
The new im_kvmrc is not used at all since the content of im_kvm.conf is
cpuarchitecture=architecture.sh
nodename=name.sh
cpu=cpu.sh
kvm=kvm-lvm.rb

Should this im_kvm.conf file include the im_kvmrc in the same directory?
I searched the whole code and couldn't find any file with  im_kvmrc in it.
Do you think this is a bug?

Thanks.
Shi



More information about the Users mailing list