Re: [Libvir] [PATCH] finish NUMA code reorg, plug cpuset at creat time support

2007-10-25 Thread Saori Fukuta
On Wed, 24 Oct 2007 05:12:42 -0400 Daniel Veillard wrote:
 On Wed, Oct 24, 2007 at 04:38:50PM +0900, Saori Fukuta wrote:
  I confirmed how I can get the cpus values at fedora8(xen-3.1.0-10.fc8),
  and I expected to be emitted (cpus '0,1'), when I specified 
  cpuset='0,1'. But xend shows nothing about cpus.
 
   Right don't assume it's there on output of the xend S-Expr for that
 domain, look at xm info --long it doesn't show it. 

Yep, it's my fault. Thank you for pointing that.

 To extract the cpuset
 you need to call the existing functionalities we have for the vcpu 
 affinities (and this may be a bit costly).
 
  Then, I could not get the cpus values by sexpr_node(root, domain/cpus).
  
  I guess this is a bug of Xen, and this has not been fixed with latest
  upstream Xen. So I will work about this for Xen before discussing about
  how xend exports.
 
   It was never in xen and I think teh new way being based on Xen-API you
 won't get a fix for upstream for our case here. I would not expect a fix
 to xend to get the solution but work it out in libvirt, but you can try ...

I reconsidered about it and I agreed with you, because we won't get 
the cpus values when pined several PCPU to each VCPU, like the 
following case:
   domA  VCPU:0  PCPU:0-1
 VCPU:1  PCPU:0-1
 VCPU:2  PCPU:2
 VCPU:3  PCPU:3
And, we certainly can get the vcpu affinities above by other way 
(i.e. call xenDaemonDomainGetVcpus and analyze the result), but
it will be costly at this time, though I would like to make them.
So could you commit the patch first to support the cpus value 
at starting/defining the guest domain for RHEL5.2 ? 

Please let me know if you have any comments and suggestions.

  thanks !

Saori

cpuset_add2.patch
Description: Binary data
--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[Libvir] read-only git mirror of libvirt CVS repository

2007-10-25 Thread Jim Meyering
I've set up an automatically-sync'd git mirror of the libvirt.org's
libvirt CVS repository.  The mirror is updated approximately every
30 minutes.  You can view the change-set summary via this URL:

http://git.et.redhat.com/?p=libvirt.git

You can get a copy of the repository with the following command:
(this uses the efficient git:// protocol, and is sort of analogous
to CVS pserver, in that you get anonymous, read-only access)

git clone git://et.redhat.com/libvirt

That command creates a libvirt/ directory.
It's not big, just 4.2MB for the .git/ repository (containing
the entire history) and the usual 10MB of code, docs and .po files.

Note, if you're new to git, you typically run git clone only
once, initially, and from then on, you cd into the directory and
download/merge the latest sources via git pull.  But note that
if you do development or otherwise modify a version-controlled
file, your next git pull won't work if the pull would have
to merge changes to one of the modified files.

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[Libvir] Bash completions for virsh

2007-10-25 Thread David Lutterkort
The attached file provides tab completion for virsh. To use them, just
source the file in bash; after that, typing 'virsh TAB' should do
something sensible (if you are on KVM, you also need to have
VIRSH_DEFAULT_CONNECT_URI set, otherwise virsh will complain when trying
to gather various info during completion.

Could this be added to the libvirt CVS in some appropriate place ? The
RPM should probably install it in /etc/bash_completion.d/

David


#-*- mode: shell-script;-*-

# Programmed completion for bash to use virsh
# Copyright 2007 Red Hat Inc.
# David Lutterkort [EMAIL PROTECTED]

_virsh_file()
{
COMPREPLY=( [EMAIL PROTECTED]:-} $( compgen -f -- $cur ) )
echo $( compgen -d -- $cur ) | while read d ; do 
COMPREPLY=( [EMAIL PROTECTED]:-} $d/ )
done
}

_virsh_domain()
{
domains=$(virsh --readonly --quiet list --all | cut -b 5- | cut -d ' ' -f 1)
COMPREPLY=( [EMAIL PROTECTED]:-} $(compgen -W $domains -- $cur) )
}

_virsh_network()
{
networks=$(virsh --readonly --quiet net-list --all | cut -d ' ' -f 1)
COMPREPLY=( [EMAIL PROTECTED]:-} $(compgen -W $networks -- $cur) )
}

_virsh_opts()
{
if [[ ${cur:0:1} == - ]] ; then
COMPREPLY=( [EMAIL PROTECTED]:-} $( compgen -W $* -- $cur ) )
fi
}

_virsh_completion ()
{
local cur prev cmd cmds ind opts cmdind comdomfile

COMPREPLY=()
cmds=$(virsh --readonly --quiet help | sed -e '1,2d;$d;s/\s\+/ 
/g;s/^\s\+//' | cut -d ' ' -f 1 2/dev/null)
opts=-c --connect -r --readonly -d --debug -h --help -q --quiet -t 
--timing -l --log -v --version
# Find the command
for ind in $( seq 1 $(($COMP_CWORD-1)) ) ; do
if [[ ${COMP_WORDS[ind]:0:1} != - ]] ; then
cmd=${COMP_WORDS[ind]}
cmdind=$(($COMP_CWORD-$ind))
break
fi
done
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
if [[ -z $cmd ]] ; then
if [[ ${cur:0:1} == - ]] ; then
COMPREPLY=( $(compgen -W $opts -- $cur) )
else
case $prev in
-c|--connect)
# Nothing to complete
;;
-d|--debug)
COMPREPLY=( $(compgen -W 0 1 2 3 4 5 -- $cur) )
;;
-l|--log)
_virsh_file
;;
*)
COMPREPLY=( $(compgen -W $cmds -- $cur) )
;;
esac
fi
return 0
fi

comdomfile=(: _virsh_domain _virsh_file)
case $cmd in
help)
COMPREPLY=( $(compgen -W $cmds -- $cur) )
;;
attach-device|detach-device)
${comdomfile[$cmdind]}
;;
attach-disk|attach-interface|detach-disk|detach-interface)
if [[ $cmdind -eq 1 ]] ; then
_virsh_domain
fi
;;
autostart)
_virsh_domain
_virsh_opts --disable
;;
console)
_virsh_domain
;;
create|define)
_virsh_file
;;
destroy)
_virsh_domain
;;
domblkstat)
if [[ $cmdind -eq 1 ]] ; then
_virsh_domain
fi
;;
domid)
_virsh_domain
;;
domifstat)
if [[ $cmdind -eq 1 ]] ; then
_virsh_domain
fi
;;
dominfo|domname|domstate|domuuid)
_virsh_domain
;;
dump)
${comdomfile[$cmdind]}
;;
dumpxml)
_virsh_domain
;;
migrate)
_virsh_domain
_virsh_opts --live
;;
list)
COMPREPLY=( $(compgen -W --inactive --all -- $cur) )
;;
net-autostart)
_virsh_network
_virsh_opts --disable
;;
net-create|net-define)
_virsh_file
;;
net-destroy|net-dumpxml)
_virsh_network
;;
net-list)
COMPREPLY=( $(compgen -W --inactive --all -- $cur) )
;;
net-name|net-start|net-undefine|net-uuid)
_virsh_network
;;
reboot)
_virsh_domain
;;
restore)
_virsh_file
;;
resume)
_virsh_domain
;;
save)
${comdomfile[$cmdind]}
;;
schedinfo)
_virsh_domain
_virsh_opts --weight --cap
;;
setmaxmem|setmem|setvcpus)
if [[ $cmdind -eq 1 ]] ; then
_virsh_domain
fi
;;
shutdown|start|suspend)
_virsh_domain
;;
ttyconsole|undefine|vcpuinfo)
_virsh_domain
;;
vcpupin)
if [[ $cmdind -eq 1 ]] ; then
_virsh_domain
  

Re: [Libvir] read-only git mirror of libvirt CVS repository

2007-10-25 Thread Jim Paris
Jim Meyering wrote:
 I've set up an automatically-sync'd git mirror of the libvirt.org's
 libvirt CVS repository.  The mirror is updated approximately every
 30 minutes.  You can view the change-set summary via this URL:
 
 http://git.et.redhat.com/?p=libvirt.git
 
 You can get a copy of the repository with the following command:
 (this uses the efficient git:// protocol, and is sort of analogous
 to CVS pserver, in that you get anonymous, read-only access)
 
 git clone git://et.redhat.com/libvirt

Hi Jim,

Thanks, now I don't have to keep a local mirror anymore :)
It seems that your mirror is missing tags, though, according to
git tags -l.  My local mirror had tags and was created with
   git-cvsimport -o master -d $CVSROOT -v -k -m -i libvirt

 Note, if you're new to git, you typically run git clone only
 once, initially, and from then on, you cd into the directory and
 download/merge the latest sources via git pull.  But note that
 if you do development or otherwise modify a version-controlled
 file, your next git pull won't work if the pull would have
 to merge changes to one of the modified files.

FWIW, I've found this to do the right thing in that case:
  git fetch
  git rebase remotes/origin/HEAD

Also, perhaps some .gitignore files could be added upstream now?
Patch below.

-jim

From c8e2192c4e209908f37fbd02d8fd5b5437d2152b Mon Sep 17 00:00:00 2001
From: Jim Paris [EMAIL PROTECTED]
Date: Mon, 13 Aug 2007 11:23:55 -0400
Subject: [PATCH] Ignore generated files (git)

---
 .gitignore  |   39 +++
 docs/.gitignore |3 +++
 docs/devhelp/.gitignore |3 +++
 docs/examples/.gitignore|7 +++
 docs/examples/python/.gitignore |2 ++
 include/.gitignore  |2 ++
 include/libvirt/.gitignore  |2 ++
 po/.gitignore   |   15 +++
 proxy/.gitignore|5 +
 python/.gitignore   |   13 +
 python/tests/.gitignore |2 ++
 qemud/.gitignore|9 +
 scripts/.gitignore  |2 ++
 src/.gitignore  |   11 +++
 tests/.gitignore|   18 ++
 tests/confdata/.gitignore   |2 ++
 tests/sexpr2xmldata/.gitignore  |2 ++
 tests/virshdata/.gitignore  |2 ++
 tests/xencapsdata/.gitignore|2 ++
 tests/xmconfigdata/.gitignore   |2 ++
 tests/xml2sexprdata/.gitignore  |2 ++
 21 files changed, 145 insertions(+), 0 deletions(-)
 create mode 100644 .gitignore
 create mode 100644 docs/.gitignore
 create mode 100644 docs/devhelp/.gitignore
 create mode 100644 docs/examples/.gitignore
 create mode 100644 docs/examples/python/.gitignore
 create mode 100644 include/.gitignore
 create mode 100644 include/libvirt/.gitignore
 create mode 100644 po/.gitignore
 create mode 100644 proxy/.gitignore
 create mode 100644 python/.gitignore
 create mode 100644 python/tests/.gitignore
 create mode 100644 qemud/.gitignore
 create mode 100644 scripts/.gitignore
 create mode 100644 src/.gitignore
 create mode 100644 tests/.gitignore
 create mode 100644 tests/confdata/.gitignore
 create mode 100644 tests/sexpr2xmldata/.gitignore
 create mode 100644 tests/virshdata/.gitignore
 create mode 100644 tests/xencapsdata/.gitignore
 create mode 100644 tests/xmconfigdata/.gitignore
 create mode 100644 tests/xml2sexprdata/.gitignore

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..dd2a475
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,39 @@
+*.o
+*.lo
+*~
+.#*
+.git
+Makefile
+aclocal.m4
+autom4te.cache
+stamp-h.in
+Makefile.in
+configure
+config.cache
+config.h
+config.h.in
+config.log
+config.guess
+config.status
+config.sub
+stamp-h
+stamp-h1
+libtool
+ltconfig
+ltmain.sh
+update.log
+libvirt.pc
+libvirt.spec
+COPYING
+m4
+ABOUT-NLS
+config.rpath
+mkinstalldirs
+coverage
+results.log
+libvirt-*.tar.gz
+INSTALL
+compile
+depcomp
+install-sh
+missing
diff --git a/docs/.gitignore b/docs/.gitignore
new file mode 100644
index 000..7e717f4
--- /dev/null
+++ b/docs/.gitignore
@@ -0,0 +1,3 @@
+Makefile
+Makefile.in
+.memdump
diff --git a/docs/devhelp/.gitignore b/docs/devhelp/.gitignore
new file mode 100644
index 000..cc4abab
--- /dev/null
+++ b/docs/devhelp/.gitignore
@@ -0,0 +1,3 @@
+Makefile
+Makefile.in
+libvirt.devhelp
diff --git a/docs/examples/.gitignore b/docs/examples/.gitignore
new file mode 100644
index 000..aa743cb
--- /dev/null
+++ b/docs/examples/.gitignore
@@ -0,0 +1,7 @@
+.memdump
+Makefile.in
+Makefile
+.deps
+.libs
+suspend
+info1
diff --git a/docs/examples/python/.gitignore b/docs/examples/python/.gitignore
new file mode 100644
index 000..282522d
--- /dev/null
+++ b/docs/examples/python/.gitignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/include/.gitignore b/include/.gitignore
new file mode 100644
index 000..282522d
--- /dev/null
+++ b/include/.gitignore
@@ -0,0 +1,2 @@