Le blog de Jean David TECHER, un Réunionnais à Saint-Priest/Lyon

Aller au contenu | Aller au menu | Aller à la recherche


< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 >

jeudi 12 janvier 2012

New release candidates for branches 1.2.23, 2.0.8, 2.1.1

Two days ago, Steve Singer published on Slony Web Site new release candidates. Content of the mail sent to Slony mailing-list
I have packaged release candidates for minor updates to multiple Slony
branches.

1.2.23 RC1
===========
- Bug #195 - make slon_quote_* functions immutable
- Bug #209 - dollar quoting doesn't work on PG 7.4
- Bug #224 - PKEYEDTABLES misspelled in altperl script
- Bug #236 - fix misformatting of log string for timestamp
- Bug #239 - Fix FAILOVER on PG 9.0 by not querying pg_listener

http://www.slony.info/downloads/1.2/source/slony1-1.2.23.rc1.tar.bz2
http://www.slony.info/downloads/1.2/source/slony1-1.2.23.rc1-docs.tar.bz2

Unless additional maintainers from the community step up 1.2.23 is
likely to be the last 1.2.x release.

2.0.8 RC1
===========
- Bug 230 - log_timestamps was always treated as true on some platforms(AIX)
- Include additional C headers required for Postgresql 9.2(master)
- Bug 233 - Fix segfault when subscribing to a set that does not exist.
- Bug 236 :: Fix default formatting of timestamp in logs
- Add express support to recognize PostgreSQL 9.1
- Bug 255 :: Fix serialization issues when using PostgreSQL 9.1

http://www.slony.info/downloads/2.0/source/slony1-2.0.8.rc1.tar.bz2
http://www.slony.info/downloads/2.0/source/slony1-2.0.8.rc1-docs.tar.bz2

2.1.1 RC1
=============
- Bug #246 :: Include path order changes
- Bug #161 :: fix memory overrun in EXECUTE SCRIPT parser
- Bug #247 :: slony_logshipper to handle TRUNCATE commands
- Bug #249 :: Add parentheses to txid_current() in function for
              TRUNCATE logging
- slonik_drop_table and slonik_drop_sequence no longer attempt to
  return -1 on an error (invalid as a slonik exit code in 2.1)
- Bug #244 :: The CREATE SET command now requires a set id to be specified.
- Bug #255 :: Fix serialization conflict issues when using PostgreSQL 9.1.
- Bug #256 :: set_conf_option() has an extra elevel parameter on PG 9.2
- Bug #259 :: Fix TRUNCATE logging so it works with mixed case slony
clusters.

http://www.slony.info/downloads/2.1/source/slony1-2.1.1.rc1.tar.bz2
http://www.slony.info/downloads/2.1/source/slony1-2.1.1.rc1-docs.tar.bz2


I hope to release actual releases in a little over a week (if no
problmems are found).  If any testers/packages plan on looking at the
release candidates but need more time then they should ask.


lundi 2 janvier 2012

Slony 1.2: Patching to support EnterpriseDB 8.3.0.112 and fix parser limit for slonik

Here are the required instructions

1. Install Slony 1.2.23

Notice: all binaries will be install in /opt/PostgresPlus/8.3R2AS/Slony/1.2.23 so we can be sure not to replace Slony's binaries 1.2.11 bundled with EnterpriseDB.
rm -rf tmp
mkdir tmp
cd tmp

SLONY_ROOT_PATH="/opt/PostgresPlus/8.3R2AS/Slony/1.2.23";

[ -d "${SLONY_ROOT_PATH}" ] && { echo "* Destroy ${SLONY_ROOT_PATH}";rm -rf ${SLONY_ROOT_PATH}; }
mkdir -pv ${SLONY_ROOT_PATH};
ln -s /opt/PostgresPlus/8.3R2AS/dbserver/lib ${SLONY_ROOT_PATH}/lib;
				 

echo "* Download  Slony sources"
#wget -q "http://git.postgresql.org/gitweb/?p=slony1-engine.git;a=snapshot;h=af01af7786f0f4f6c5c5ea991200be04a431f586;sf=tgz" -O - | tar xzf -
wget -q "http://git.postgresql.org/gitweb/?p=slony1-engine.git;a=snapshot;h=4a7f6887ef59d185be1ea421b82cc51b3ae75e1d;sf=tgz" -O - | tar xzf -
cd slony1-*

echo "* Patch for EnterpriseDB"
wget -q http://www.davidgis.fr/download/patch_EnterpriseDB.patch  -O - | patch -p1

echo "* Replace ' slon ' by ' edb-replication '"
grep -lri " slon " src/slon/ | xargs -i sed -i "s: slon : edb-replication :g" {}

echo " * Configure"
./configure -q \
--prefix=${SLONY_ROOT_PATH} \
--with-pgconfigdir=/opt/PostgresPlus/8.3R2AS/dbserver/bin/ \
--with-perlsharedir=${SLONY_ROOT_PATH}/lib \
--with-pgsharedir=${SLONY_ROOT_PATH}/share \
--with-perltools=${SLONY_ROOT_PATH}/scripts \
--with-pglibdir=${SLONY_ROOT_PATH}/lib \
--with-pgpkglibdir=${SLONY_ROOT_PATH}/lib

echo "* Put hardcoded value for '${SLONY_ROOT_PATH}/lib' instead of '\$libdir'"
grep -lriE '\$libdir' . | while read file;do sed -i 's:\$libdir:/opt/PostgresPlus/8.3R2AS/Slony/1.2.23/lib:g' $file;done


echo "* First compilation"
make -s

echo "* Fix limit for parser for slonik 10000 to 100000";
grep -lri "define YYINITDEPTH 200" . | xargs -i sed -i "s:# define YYMAXDEPTH 10000:# define YYMAXDEPTH 100000:g;s:# define YYINITDEPTH 200:# define YYINITDEPTH 10000:g" {}

echo "* Secund compilation"
make -s

echo "* Destroy Temporary Link"
rm -rf ${SLONY_ROOT_PATH};

echo "* Ready to install";

vendredi 30 décembre 2011

Déboucher ses toillettes: méthode testée et approuvée

Une méthode très efficace trouvée sur le blog d'une jeune geek http://www.pakito.eu/vie-pratique/how-to-deboucher-ses-chiottes/. Comme beaucoup au début, je ne croyais pas trop à l'efficacité de sa méthode. Mais elle fonctionne du tonnerre de dieu

dimanche 25 décembre 2011

Xen 4.2 unstable: Xen PVHVM on Linux HVM + VGA Pass Through (NVIDIA): it works for Linux 3.1.6 !

I asked myself if it could be possible to use
  • Xen VGA Pass Through for NVIDIA
  • Xen PVHVM
on a Linhx HVM domU.

The answer is yes! I went on [1]. I was a little confused by the idea that it could very easy to do.

I spent a lof of time trying to resolve several issues (...) But all issues are fixed now .

Here the assumption is done that we've already have a fresh domU running on Ubuntu Lucid 10.4.3 and Xen VGA Pass Through (for more info about VGA Pass Through refer to my previous article)

1. When everything is OK, we've got...

Refer to [1], we have

Xen PV HVM on domU (HVM) Ubuntu Lucid 10.4.3: VGA Pass Through is working too
root@mercury-xen01:~# dmesg | egrep -i 'xen|blk'
[    0.000000] Linux version 3.1.6 (root@mercury-xen01) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #1 SMP Sun Dec 25 01:26:07 CET 2011
[    0.000000] DMI: Xen HVM domU, BIOS 4.2-unstable 12/22/2011
[    0.000000] Hypervisor detected: Xen HVM
[    0.000000] Xen version 4.2.
[    0.000000] Xen Platform PCI: I/O protocol version 1
[    0.000000] Netfront and the Xen platform PCI driver have been compiled for this kernel: unplug emulated NICs.
[    0.000000] Blkfront and the Xen platform PCI driver have been compiled for this kernel: unplug emulated disks.
[    0.000000] ACPI: RSDP 00000000000ea020 00024 (v02    Xen)
[    0.000000] ACPI: XSDT 00000000fc00f680 00054 (v01    Xen      HVM 00000000 HVML 00000000)
[    0.000000] ACPI: FACP 00000000fc00f340 000F4 (v04    Xen      HVM 00000000 HVML 00000000)
[    0.000000] ACPI: DSDT 00000000fc003600 0BCBC (v02    Xen      HVM 00000000 INTL 20100528)
[    0.000000] ACPI: APIC 00000000fc00f440 000D8 (v02    Xen      HVM 00000000 HVML 00000000)
[    0.000000] ACPI: HPET 00000000fc00f590 00038 (v01    Xen      HVM 00000000 HVML 00000000)
[    0.000000] ACPI: WAET 00000000fc00f5d0 00028 (v01    Xen      HVM 00000000 HVML 00000000)
[    0.000000] ACPI: SSDT 00000000fc00f600 00031 (v02    Xen      HVM 00000000 INTL 20100528)
[    0.000000] ACPI: SSDT 00000000fc00f640 00031 (v02    Xen      HVM 00000000 INTL 20100528)
[    0.000000] Booting paravirtualized kernel on Xen HVM
[    0.000000] Xen HVM callback vector for event delivery is enabled
[    0.135090] Xen: using vcpuop timer interface
[    0.135094] installing Xen timer for CPU 0
[    0.300043] installing Xen timer for CPU 1
[    0.470043] installing Xen timer for CPU 2
[    0.640040] installing Xen timer for CPU 3
[    1.031644] xen/balloon: Initialising balloon driver.
[    1.031654] xen-balloon: Initialising balloon driver.
[    1.050023] Switching to clocksource xen
[    1.051618] xen: --> pirq=19 -> irq=8 (gsi=8)
[    1.051659] xen: --> pirq=20 -> irq=12 (gsi=12)
[    1.051689] xen: --> pirq=21 -> irq=1 (gsi=1)
[    1.051720] xen: --> pirq=22 -> irq=6 (gsi=6)
[    1.051753] xen: --> pirq=23 -> irq=4 (gsi=4)
[    1.051791] xen: --> pirq=54 -> irq=7 (gsi=7)
[    2.061962] QLogic/NetXen Network Driver v4.0.76
[    2.062183] xen: --> pirq=17 -> irq=17 (gsi=17)
[    2.090348] xen: --> pirq=18 -> irq=21 (gsi=21)
[    2.260133] xen: --> pirq=53 -> irq=28 (gsi=28)
[    2.260136] xen-platform-pci 0000:00:03.0: PCI INT A -> GSI 28 (level, low) -> IRQ 28
[    2.266953] input: Xen Virtual Keyboard as /devices/virtual/input/input3
[    2.267012] input: Xen Virtual Pointer as /devices/virtual/input/input4
[    2.269131] Initialising Xen virtual ethernet driver.
[    2.281965] blkfront: xvda: flush diskcache: enabled
[    2.282796] vbd vbd-51744: 19 xenbus_dev_probe on device/vbd/51744
[    2.283048] vbd vbd-51744: failed to write error node for device/vbd/51744 (19 xenbus_dev_probe on device/vbd/51744)
[    7.515418] xen: --> pirq=55 -> irq=44 (gsi=44)
[    8.328334] xen: --> pirq=52 -> irq=40 (gsi=40)
[    8.488638] xen: --> pirq=51 -> irq=36 (gsi=36)

Source

2. domU: Kernel 3.1.6

  1. Download the sources
    wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.1.6.tar.bz2
    tar xjf linux-3.1.6.tar.bz2
    cd linux-3.1.6
  2. Prepare the configuration
    make menuconfig
    The most important is to be sure to have the same following configuration. Be sure to have CONFIG_XEN_PLATFORM_PCI compile as a module (=m).
    root@mercury-xen01:/usr/src/linux-3.1.6# grep -i xen .config
    CONFIG_XEN=y
    CONFIG_XEN_DOM0=y
    CONFIG_XEN_PRIVILEGED_GUEST=y
    CONFIG_XEN_PVHVM=y
    CONFIG_XEN_MAX_DOMAIN_MEMORY=128
    CONFIG_XEN_SAVE_RESTORE=y
    CONFIG_XEN_DEBUG_FS=y
    CONFIG_XEN_DEBUG=y
    CONFIG_PCI_XEN=y
    CONFIG_XEN_PCIDEV_FRONTEND=m
    CONFIG_XEN_BLKDEV_FRONTEND=m
    # CONFIG_XEN_BLKDEV_BACKEND is not set
    CONFIG_NETXEN_NIC=y
    CONFIG_XEN_NETDEV_FRONTEND=m
    CONFIG_XEN_NETDEV_BACKEND=m
    CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
    CONFIG_HVC_XEN=y
    # CONFIG_XEN_WDT is not set
    CONFIG_XEN_FBDEV_FRONTEND=y
    # Xen driver support
    CONFIG_XEN_BALLOON=y
    CONFIG_XEN_SCRUB_PAGES=y
    CONFIG_XEN_DEV_EVTCHN=y
    CONFIG_XEN_BACKEND=y
    CONFIG_XENFS=y
    CONFIG_XEN_COMPAT_XENFS=y
    CONFIG_XEN_SYS_HYPERVISOR=y
    CONFIG_XEN_XENBUS_FRONTEND=y
    CONFIG_XEN_GNTDEV=m
    CONFIG_XEN_GRANT_DEV_ALLOC=m
    CONFIG_XEN_PLATFORM_PCI=m
    CONFIG_SWIOTLB_XEN=y
    CONFIG_XEN_PCIDEV_BACKEND=m
    
    Notice: you can download my own configuration here
  3. Build and install
    make -j4 bzImage modules
    make install modules_install
  4. Change the content of file /etc/initramfs-tools/modules
    root@mercury-xen01:~# cat /etc/initramfs-tools/modules 
    # List of modules that you want to include in your initramfs.
    #
    # Syntax:  module_name [args ...]
    #
    # You must run update-initramfs(8) to effect this change.
    #
    # Examples:
    #
    # raid1
    # sd_mod
    xen-platform-pci
    xen-blkfront
    xen-netfront
    
  5. Build initrd
    mkinitramfs -o /boot/initrd.img-3.1.6 3.1.6
    

3. domU: Grub

  1. Change grub options in /etc/default/grub
    root@mercury-xen01:~# cat /etc/default/grub 
    # If you change this file, run 'update-grub' afterwards to update
    # /boot/grub/grub.cfg.
    
    GRUB_DEFAULT=0
    GRUB_HIDDEN_TIMEOUT=0
    GRUB_HIDDEN_TIMEOUT_QUIET=true
    GRUB_TIMEOUT=120
    GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
    GRUB_CMDLINE_LINUX_DEFAULT="loglevel=9 rootdelay=120 quiet splash"
    GRUB_CMDLINE_LINUX=""
    
    # Uncomment to disable graphical terminal (grub-pc only)
    #GRUB_TERMINAL=console
    
    # The resolution used on graphical terminal
    # note that you can use only modes which your graphic card supports via VBE
    # you can see them in real GRUB with the command `vbeinfo'
    #GRUB_GFXMODE=640x480
    
    # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
    GRUB_DISABLE_LINUX_UUID=true
    
    # Uncomment to disable generation of recovery mode menu entries
    #GRUB_DISABLE_LINUX_RECOVERY="true"
    
    # Uncomment to get a beep at grub start
    #GRUB_INIT_TUNE="480 440 1"
    
  2. Update grub
    root@mercury-xen01:~# update-grub
    Generating grub.cfg ...
    Found linux image: /boot/vmlinuz-3.1.6
    Found initrd image: /boot/initrd.img-3.1.6
    ....
    
  3. Edit /boot/grub/grub.cfg. We need to replace the line root=/dev/sda1 by root=/dev/xvda1
    ...
    ....
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'Ubuntu, avec Linux 3.1.6' --class ubuntu --class gnu-linux --class gnu --class os {
            recordfail
            insmod ext2
            set root='(hd0,1)'
            search --no-floppy --fs-uuid --set b199c136-7ea3-4244-b51a-9adfd52ea892
            linux   /boot/vmlinuz-3.1.6 root=/dev/xvda1 ro   loglevel=9 rootdelay=120 quiet splash
            initrd  /boot/initrd.img-3.1.6
    }
    
  4. Shutdown the domU

4. dom0: domU configuration

  1. For the first boot (*) You need to change every hdX to xvdX. For example, here the content of my configuration file
    root@mercury:~# grep -vE '^(#|$)' /etc/xen/machines/mercury-xen01.cfg 
    builder='hvm'
    shadow_memory = 128
    name = "mercury-xen01"
    memory      = '3072'
    vcpus = '4'
    disk        = [
                      'phy:/dev/xenvg/mercury-xen01-disk-1,xvda,w',
    		   'file:/opt/Xen/CD_DVD/Quake_III_Arena.iso,xvdc:cdrom,r',
                  ]
    boot="cd"
    name        = 'mercury-xen01'
    vif         = [ 'mac=00:16:3E:B7:05:58,bridge=eth0,model=e1000' ]
    on_poweroff = 'destroy'
    on_reboot   = 'restart'
    on_crash    = 'restart'
    sdl=0
    vnc=1
    vnclisten="0.0.0.0"
    vncconsole=1
    vncpasswd=''
    gfx_passthru=1
    pci  = [ '01:00.0','00:1a.0','00:1d.0' ]
    acpi=1
    apic=1
    xen_extended_power_mgmt=1
    pae=1
    arch='x86_64'
    hpet = 1
    hap = 1
    monitor=1
    serial='pty'
    keymap='fr'
    soundhw = "all"
    audio="on"
    xen_platform_pci=1
    
    (*) For a unknown reason , after several reboots, you can put hd[a-] instead of xvd[a-d]
  2. Restart the domU
  3. Reinstall NVIDIA driver for the new kernel

5 Last fix: Automount CDROM device

When googling a lot, I found this url http://www.ossramblings.com/automount-cdrom-ubuntu-lucid-maverick then I did
apt-get remove --purge hal
apt-get install hal
apt-get install halevt
gnome-volume-manager is not available on Ubuntu Lucid 10.4.3 so I replace it by halevt