Tuesday, August 18, 2020

Cockpit web interface  PR_CONNECT_RESET_ERROR

oVirt 4.4.1 

Cockpit web interface  PR_CONNECT_RESET_ERROR

grep cockpit-tls /var/log/audit/audit.log | audit2allow  -M cockpit-tls

semodule -i cockpit-tls.pp


Thursday, August 29, 2019

Upgrade oVirt host node from 4.0 to 4.1 or 4.2 dependency error Error: Package: vdsm-gluster-4.20.23-1.el7


Upgrade oVirt host node from 4.0 to 4.1 or 4.2 dependency error Error: Package: vdsm-gluster-
4.20.23-1.el7 from Centos install. This is not a imgbase install.


yum remove ovirt-release40
yum install https://resources.ovirt.org/pub/yum-repo/ovirt-release42.rpm
yum clean all ; yum makecache ; yum install ovirt-host
yum remove vdsm-gluster.noarch
yum install ovirt-host #Or Execute Upgrade from Engine

Detailed Instructions

Error


yum install ovirt-host

--> Running transaction check
---> Package centos-release.x86_64 0:7-2.1511.el7.centos.2.10 will be updated
---> Package centos-release.x86_64 0:7-6.1810.2.el7.centos will be an update
---> Package vdsm-gluster.noarch 0:4.20.23-1.el7.centos will be an update
--> Processing Dependency: vdsm = 4.20.23-1.el7.centos for package: vdsm-gluster-4.20.23-1.el7.centos.noarch
--> Finished Dependency Resolution
Error: Package: vdsm-gluster-4.20.23-1.el7.centos.noarch (ovirt-4.2)
           Requires: vdsm = 4.20.23-1.el7.centos
           Removing: vdsm-4.18.11-1.el7.centos.x86_64 (installed)
               vdsm = 4.18.11-1.el7.centos
           Updated By: vdsm-4.20.46-1.el7.x86_64 (ovirt-4.2)
               vdsm = 4.20.46-1.el7
           Available: vdsm-4.20.9.3-1.el7.centos.x86_64 (ovirt-4.2)
               vdsm = 4.20.9.3-1.el7.centos
           Available: vdsm-4.20.13-1.el7.centos.x86_64 (ovirt-4.2)
               vdsm = 4.20.13-1.el7.centos
           Available: vdsm-4.20.14-1.el7.centos.x86_64 (ovirt-4.2)
               vdsm = 4.20.14-1.el7.centos
           Available: vdsm-4.20.17-1.el7.centos.x86_64 (ovirt-4.2)
               vdsm = 4.20.17-1.el7.centos
           Available: vdsm-4.20.18-1.el7.centos.x86_64 (ovirt-4.2)
               vdsm = 4.20.18-1.el7.centos
           Available: vdsm-4.20.19-1.el7.centos.x86_64 (ovirt-4.2)
               vdsm = 4.20.19-1.el7.centos
           Available: vdsm-4.20.20-1.el7.centos.x86_64 (ovirt-4.2)
               vdsm = 4.20.20-1.el7.centos
           Available: vdsm-4.20.22-1.el7.centos.x86_64 (ovirt-4.2)
               vdsm = 4.20.22-1.el7.centos
           Available: vdsm-4.20.23-1.el7.x86_64 (ovirt-4.2-centos-ovirt42)
               vdsm = 4.20.23-1.el7
           Available: vdsm-4.20.23-1.el7.centos.x86_64 (ovirt-4.2)
               vdsm = 4.20.23-1.el7.centos
           Available: vdsm-4.20.27.1-1.el7.centos.x86_64 (ovirt-4.2)
               vdsm = 4.20.27.1-1.el7.centos
           Available: vdsm-4.20.32-1.el7.x86_64 (ovirt-4.2)
               vdsm = 4.20.32-1.el7
           Available: vdsm-4.20.33-1.el7.x86_64 (ovirt-4.2)
               vdsm = 4.20.33-1.el7
           Available: vdsm-4.20.34-1.el7.x86_64 (ovirt-4.2)
               vdsm = 4.20.34-1.el7
           Available: vdsm-4.20.35-1.el7.x86_64 (ovirt-4.2)
               vdsm = 4.20.35-1.el7
           Available: vdsm-4.20.39-1.el7.x86_64 (ovirt-4.2)
               vdsm = 4.20.39-1.el7
           Available: vdsm-4.20.39.1-1.el7.x86_64 (ovirt-4.2)
               vdsm = 4.20.39.1-1.el7
           Available: vdsm-4.20.43-1.el7.x86_64 (ovirt-4.2)
               vdsm = 4.20.43-1.el7
                                     

Solution 


yum remove vdsm-gluster.noarch
             
======================================================================================================================================================================================================= Package                                                                   Arch                                                     Version                                                                  Repository                                                   Size
=======================================================================================================================================================================================================Removing:
 vdsm-gluster                                                              noarch                                                   4.18.11-1.el7.centos                                                     installed                                                   234 k
Removing for dependencies:
 ovirt-release-host-node                                                   noarch                                                   4.0.3-1.el7                                                              installed                                                   315 k

Transaction Summary
=======================================================================================================================================================================================================Remove  1 Package (+1 Dependent package)

Installed size: 549 k
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : ovirt-release-host-node-4.0.3-1.el7.noarch                                                                                                                                                                                                                  1/2
  Erasing    : vdsm-gluster-4.18.11-1.el7.centos.noarch                                                                                                                                                                                                                    2/2
  Verifying  : ovirt-release-host-node-4.0.3-1.el7.noarch                                                                                                                                                                                                                  1/2
  Verifying  : vdsm-gluster-4.18.11-1.el7.centos.noarch                                                                                                                                                                                                                    2/2

Removed:
  vdsm-gluster.noarch 0:4.18.11-1.el7.centos                                                                                                                                                                                                                                 
and than upgrade from Engine which executes "yum install ovirt-host"


Thursday, May 23, 2019

Systemd disable STD I/O from service


sudo systemctl edit service@.service

[Service]
StandardOutput=null
StandardError=null

or

sudo systemctl edit service.service

[Service]
StandardOutput=null 
StandardError=null

Clear journalctl

sudo journalctl --rotate
sudo journalctl --vacuum-time=1s

or

sudo journalctl --rotate
sudo journalctl --vacuum-size=50M

Friday, August 10, 2018

Live resize Linux partition.


If disk has two partitions and we extended the disk to get more free space we can extend partition to use free space.

1. Use growpart

Test run if partition can be extended

sudo growpart -N /dev/vda 2 && echo $?

Actual extending partition

sudo growpart /dev/vda 2 && echo $?
In Debian and Ubuntu it is packaged as cloud-guest-utils.

2. Use parted, resizepart

sudo parted resizepart 2 -1

3. fdisk for advanced users
Use fdisk to delete partition and create new one to the end of disk.

Tuesday, August 7, 2018

How to Import a Git Repository from bundle backup


git clone --mirror test.bundle

cd test

git remote rm origin

git remote add origin https://git.mydomain.com/test/test.git

git push -u origin master


Wednesday, June 8, 2016

Windows 10 guest slow on VirtualBox

Windows 10 guest slow on VirtualBox

For improving Windows 10 performance in VirtualBox, shutdown Windows 10, go to settings of your Windows 10 VirtualBox definition and change default hypervisor.


VM Settings > System > Acceleration tab, Paravirtualization, select Hyper-V (previously set to Default)



It might help using USB 3.0 in configuration instead of USB 2.0.


Solution was found here

Wednesday, January 28, 2015

Kate upgrade 4.14 to 5.0 session recover





Sessions in KDE 5 Kate are located in different folder jut copy sessions over to new folder and they will work out of the box.


cp ~/.kde4/share/apps/kate/sessions ~/.local/share/kate/sessions

Monday, September 22, 2014

Google Chrome backup or restore Seesion or Tabs

On Linux go to home directory and copy these two files

~/.config/google-chrome/Default

"Last Session"
"Last Tabs"

Wednesday, May 28, 2014

Can't switch keyboard in google-chrome or chromium from version 35+ --> Fixed in /etc/locale.conf

Keyboard layout switcher doesn't work if browser is started in en_US locale!
Because of that you need to start google-chrome or chromium with whatever non-English locale you use for example LANG=sl_SI.UTF-8 for Slovenian locale.

Running google-chrome like this fixes the problem.

`LANG=sl_SI.UTF-8 /usr/bin/google-chrome-stable`

You can create KDE Desktop shortcut Chrome.desktop

[Desktop Entry]
Comment[en_US]=
Comment=
Exec=LANG=sl_SI.UTF-8 /usr/bin/google-chrome-stable
GenericName[en_US]=
GenericName=
Icon=google-chrome
MimeType=
Name[en_US]=Google-Chrome
Name=Google-Chrome
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=

Update 31.08.2014
A general system wide fix for all users is to update locale.conf with more advanced options:

Create or edit /etc/locale.conf with these options:

# Enable UTF-8 with US settings.
LANG="en_US.UTF-8"

# Keep the default sort order (e.g. files starting with a '.'
# should appear at the start of a directory listing.)
LC_COLLATE="C"

# Set the short date to YYYY-MM-DD (test with "date +%c")
LC_TIME="sl_SI.UTF-8"




Monday, April 21, 2014

KDE Upgrade 4.13 came up with baloo indexer and there is no button to turn it off. 

KDE Upgrade 4.13 came up with baloo indexer and there is no button to turn it off.

So here are some ideas

I decided for First method

1. Legal way to block searcher
Go to KDE System Settings > Desktop Search > click plus sign and add your home to excluded folders.

You need to log out or reboot or run the script below  to stop the current indexer!

2. More intrusive version create kill script to run at KDE start-up
vi BalooStop.sh 

#!/bin/bash
killall -9 baloo_file_cleaner
killall -9 baloo_file
killall -9 baloo_file_extr
#rm -rf ~/.local/share/baloo/*

chmod +x BalooStop.sh 
./BalooStop.sh 

3. More hakish way create symlinks to /bin/true

mv /usr/bin/baloo_file_extractor /usr/bin/baloo_file_extractor.orig; ln -s /bin/true /usr/bin/baloo_file_extractor

mv /usr/bin/baloo_file_cleaner /usr/bin/baloo_file_cleaner.orig; ln -s /bin/true /usr/bin/baloo_file_cleaner

Wednesday, April 9, 2014

The heartbleed bug was introduced in OpenSSL 1.0.1 and is present in

1.0.1
1.0.1a
1.0.1b
1.0.1c
1.0.1d
1.0.1e
1.0.1f

The bug is NOT PRESENT in 1.0.1g, 1.0.0 and 0.9.8 branch of OpenSSL.

Check Arch Linux 

pacman -Q openssl
local/openssl 1.0.1.f-1    

If you see any version above you need to patch Arclinux

pacman -Sy ; pacman -S openssl ;

Check rpm based systems Centos/RedHat/Oracle Linux

rpm -qa |grep openssl
openssl-1.0.0

If you see any version above you need to patch OS

yum update openssl
Apache upgrade 2.2 to 2.4

Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe.  You need to recompile PHP.

In your httpd.conf find the line that loads the event MPM:

LoadModule mpm_event_module modules/mod_mpm_event.so

Replace it with one that loads the prefork MPM:

LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

Of course you still need to load the PHP5 module (libphp5.so) and the corresponding config file somewhere.

Tuesday, March 25, 2014

Arch Linux enable / disable journal logging


Create script to enable disable journal logging.
To prevent SD card wearing on RaspberryPi  I've decided to take control of journal logging.

start_loging_journal.sh

#!/bin/bash
sed -i '/Storage=none/d'  /etc/systemd/journald.conf
systemctl restart systemd-journald

stop_loging_journal.sh

#!/bin/bash
sed -i '/Storage=none/d'  /etc/systemd/journald.conf
echo "Storage=none" >> /etc/systemd/journald.conf
systemctl restart systemd-journald

Wednesday, January 22, 2014

BTRFS File-level cloning in a split of a second.

Clone a file on btrfs in a split of a second

cp --reflink=always file.img clone_of_file.img

Before copying file
$ ls -s1
10485760 Centos53-2.img

Copying 10GB file
$ time cp --reflink=always  Centos53-2.img Centos53-2_copy.img

real    0m0.001s
user    0m0.000s
sys     0m0.000s

After copying file 
$ ls -s1
10485760 Centos53-2_copy.img
10485760 Centos53-2.img

Monday, January 20, 2014

Systemd default output or error output for all services and sockets

From man systemd and man systemd.unit(5)

StandardOutput=
StandardError=

Takes one of inherit, null, tty, journal, journal+console, syslog, syslog+console, kmsg, kmsg+console.

Wednesday, January 8, 2014

Arch Linux journalctl -f is very slow on btrfs filesystem


Check log size
journalctl --disk-usage

Check log for fragments
filefrag /var/log/journal/*/*

Defragment log
btrfs fi defrag -v -f -clzo /var/log/journal/*/*

Friday, November 29, 2013

LTFS Oracle/Centos/Redhat  Linux 


1. Dovnload "Single Drive Edition"/SDE LTFS driver and LTFS filesystem utilities from IBM use link Download driver  or Google "Downloading LTFS"

2. Install FUSE support 
yum install fuse-libs.x86_64 fuse.x86_64

3. Install LTFS File system 
rpm -iv ltfs-*.rpm

4. Insert tape to  LTO drive 

5. mount LTFS ilesystem.
ltfs -o devname=/dev/IBMtape0 /LTFS/

Mounting a XEN/KVM/QEMU Image on ARCH Linux


Attach image 

#Load nbd driver
modprobe nbd max_part=8

#Attach system image 
qemu-nbd --connect=/dev/nbd0  System.img

#Mount Second partition
mount /dev/nbd0p2 /media

Release image


#Umount partition 
umount /media/

#Remove image 
qemu-nbd  -d /dev/nbd0

#Remove driver 
modprobe -r nbd 

Monday, July 8, 2013

Kernel-3.10 Nvidia 325.08 error

Found working patch from the nvidia developers forum. https://devtalk.nvidia.com/cmd/default/download-
comment-attachment/58795/ 

How to apply patch in Gentoo: Just let epatch_user do the work :-)

All you need to do is create a nvidia-drivers dir in /etc/portage/patches/x11-drivers/
mkdir -p /etc/portage/patches/x11-drivers/nvidia-drivers 

Download patch and copy it to newly created directory.
cp ~/Downloads/nvidia-drivers-linux-3.10.patch /etc/portage/patches/x11-drivers/nvidia-drivers/ 

Then just emerge nvidia-drivers or module-rebuild rebuild
PATCHES=/etc/portage/patches emerge -va nvidia-drivers