Table des matières
- 2026:
- 2025:
4 billet(s) pour septembre 2026
| Notes HTTP Strict Transport Security - HSTS | 2026/09/18 11:04 | Jean-Baptiste |
| Notes GNU Linux GPU carte graphiques | 2026/09/08 15:49 | Jean-Baptiste |
| Notes GNU Linux graphique | 2026/09/08 15:42 | Jean-Baptiste |
| Notes urlencoding - passer des mots de passe en HTTPS | 2026/09/03 17:58 | Jean-Baptiste |
Boot KO - Dracut - LVM
If the lvm lvs doesn't show any vol group then run as,
# List volume groups lvm lvs # Activate the volume groups lvm vgchange -ay # Continue to boot exit # If this also does not work then run mv /etc/lvm/lvm.conf /tmp/ cat /proc/partitions cat /proc/scsi/scsi cat /proc/cmdline ls /sys/module/
Pb mode single KO, fichier /dev/mapper manquant
Erratum A la place de passer init=/bin/bash au kernel il faut lui passer 1 ou single
Un défaut empêche le boot en mode single nécessaire pour certaines opérations de maintenance En dehors du LV racine et la LV du swap aucun LV n’est monté. Les block devices sont absents dans /dev/
Voici comment y remédier
# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert temlv toolsvg -wi------- 2.00g toolsadminlv toolsvg -wi------- 1.00g homelv vg00 -wi------- 512.00m optlv vg00 -wi------- 128.00m rootlv vg00 -wi-ao---- 2.00g swaplv vg00 -wi-ao---- 2.00g tmplv vg00 -wi------- 1.00g usrlv vg00 -wi------- 3.00g varlv vg00 -wi------- 3.00g
Pour activer tous les LV
vgchange -a y
Nous constatons des absents :
# ls -1 /dev/mapper/ control vg00-rootlv vg00-swaplv
Pour monter /usr (Est-ce nécessaire ?)
mknod /dev/mapper/vg00-usrlv block 253 6 mount /dev/mapper/vg00-usrlv /usr
Pour générer de nouveau l’initramfs :
dracut -f -v
Puis
touch /.autorelabel /sbin/reboot -f
Notes OpenStack
Brouillon
Voir :
- magnum - OpenStack containers as a service
OpenStack
Voir aussi :
- OpenNebula
- CloudStack
Devstack
Pré-requis :
- 8Go RAM
- 2 Cores
- 1 NIC
Voir : https://wescale.developpez.com/tutoriels/apprendre-openstack-les-bases/
Install : https://github.com/rdoxenham/openstack-training/blob/master/labs/openstack-summit.md
Ubuntu LTS
export NO_PROXY=localhost,127.0.0.1,192.168.56.22 # export http_proxy=http://127.0.0.1:3128 # export https_proxy=http://127.0.0.1:3128 export ALL_PROXY=http://127.0.0.1:3128 git config --global http.proxy http://192.168.56.1:3128 git clone https://git.openstack.org/openstack-dev/devstack
cp -p ./samples/local.conf .
./stack.sh:751:git_clone /opt/stack/devstack/functions-common:537:git_timed /opt/stack/devstack/functions-common:601:die [ERROR] /opt/stack/devstack/functions-common:601 git call failed: [git clone git://git.openstack.org/openstack/requirements.git /opt/stack/requirements --branch master] Error on exit
git config --global url."https://".insteadOf git://
local.conf
ADMIN_PASSWORD=secret DATABASE_PASSWORD=$ADMIN_PASSWORD RABBIT_PASSWORD=$ADMIN_PASSWORD SERVICE_PASSWORD=$ADMIN_PASSWORD IPV4_ADDRS_SAFE_TO_USE=192.168.56.0/24 HOST_IP=192.168.56.22 LOGDAYS=1 LOGFILE=$DEST/logs/stack.sh.log RECLONE=yes PIP_UPGRADE=True #IP_VERSION=4+6 IP_VERSION=4 DEFAULT_INSTANCE_TYPE=m1.tiny
journalctl --unit devstack@*
apt-get update && apt-get upgrade apt-get install git adduser stack echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/stack su - stack export http_proxy=http://192.168.56.1:3128 export https_proxy=http://192.168.56.1:3128 git clone https://git.openstack.org/openstack-dev/devstack cd devstack/samples cp local.conf .. cd ..
local.conf
HOST_IP=192.168.56.101 FLOATING_RANGE=192.168.56.224/27
./stack.sh
timeout -s SIGINT 0 git clone git://git.openstack.org/openstack/keystone.git /opt/stack/keystone --branch master openstack --os-cloud=devstack-admin --os-region-name=RegionOne image create cirros-0.3.5-x86_64-disk --public --container-format=bare --disk-format qcow2
Voir :
local.conf
[[local|localrc]] ADMIN_PASSWORD=secret DATABASE_PASSWORD=$ADMIN_PASSWORD RABBIT_PASSWORD=$ADMIN_PASSWORD SERVICE_PASSWORD=$ADMIN_PASSWORD HOST_IP=10.245.108.3 LOGFILE=$DEST/logs/stack.sh.log LOGDAYS=2 SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5 SWIFT_REPLICAS=1 SWIFT_DATA_DIR=$DEST/data
sudo su - stack cd devstack source openrc export OS_USERNAME=admin #export OS_PASSWORD=secret #export OS_PROJECT_NAME=admin #export OS_USER_DOMAIN_ID=default #export OS_PROJECT_DOMAIN_ID=default #export OS_IDENTITY_API_VERSION=3 #export OS_AUTH_URL=http://localhost:5000/v3 openstack user list openstack image list nova service-list nova list openstack server list cinder list sudo journalctl -f --unit devstack@* #nova show 936ea954-b91f-4490-bbc6-f36c22f27db1 openstack server show 416b59a7-aede-4c9b-94cf-ad37d2bd3e6e -f shell
Error: Failed to perform requested operation on instance "plop", the instance has an error status: Please try again later [Error: No valid host was found. There are not enough hosts available.]. No valid host was found. There are not enough hosts available.
# export http_proxy=http://127.0.0.1:3128 # export https_proxy=http://127.0.0.1:3128 export ALL_PROXY=http://127.0.0.1:3128 export NO_PROXY=localhost,127.0.0.1,10.245.108.3,192.168.122.0/24
VirtIO
glance image-update \
--property hw_scsi_model=virtio-scsi \
[image]
hw_disk_bus_model=virtio-scsi
hw_scsi_model=virtio-scsi
hw_disk_bus=scsi
/etc/keystone/keystone.conf
[token] expiration = 36000
/opt/stack/horizon/openstack_dashboard/local/local_settings.py
SESSION_TIMEOUT=36000
systemctl restart devstack@keystone.service
systemctl restart apache2
~/devstack/stackrc
if ! isset ENABLED_SERVICES ; then # Keystone - nothing works without keystone ENABLED_SERVICES=key # Nova - services to support libvirt based openstack clouds ENABLED_SERVICES+=,n-api,n-cpu,n-cond,n-sch,n-novnc,n-cauth,n-api-meta # Placement service needed for Nova ENABLED_SERVICES+=,placement-api,placement-client # Glance services needed for Nova ENABLED_SERVICES+=,g-api,g-reg # Cinder ENABLED_SERVICES+=,c-sch,c-api,c-vol # Neutron ENABLED_SERVICES+=,q-svc,q-dhcp,q-meta,q-agt,q-l3 # Dashboard ENABLED_SERVICES+=,horizon # Additional services ENABLED_SERVICES+=,rabbit,tempest,mysql,etcd3,dstat # PERSO ENABLED_SERVICES+=,n-sproxy fi
Diag
RabbitMQ
sudo rabbitmqctl list_queues
Supervision
OpenStack supervision - Diag
- db ok ?
- ping openstack cli
- rabbitmq ?
- port listen : 5000/tcp
OpenStack SWIFT
Voir :
- swift-container
Install
https://wiki.openstack.org/wiki/SwiftInstall
mkdir /etc/swift cat /usr/share/doc/swift/swift.conf-sample > /etc/swift/swift.conf #chown -R swift: /etc/swift
Install de Rsync en mode daemon
Install de Memcache
Notes OpenStack Nova
Install
Sur le controller
CREATE ROLE novauser WITH LOGIN PASSWORD 'toor'; CREATE DATABASE nova OWNER novauser ; CREATE DATABASE nova_api OWNER novauser ; CREATE DATABASE nova_cell0 OWNER novauser ;
openstack user create --domain default --password-prompt nova openstack role add --project service --user nova admin openstack service create --name nova --description "OpenStack Compute" compute openstack endpoint create --region RegionOne compute public http://controller:8774/v2.1
Sur les noeuds
yum install epel-release yum install centos-release-openstack-rocky yum install openstack-nova-api openstack-nova-conductor openstack-nova-novncproxy openstack-nova-scheduler openstack-nova-cert openstack-nova-console
Autres
Status
source openrc
nova service-list
openstack server list --name vm1 openstack server show vm1 nova reboot --hard vm1 openstack server list --status SHUTOFF -f value -c ID journalctl -u "devstack@c-*" -f
USE nova_cell1; SELECT * FROM instances WHERE hostname='vm1' \G ;
Notes OpenStack Neutron Réseaux
Réseau basique (hors Neutron)
Devstack - Autoriser les VMs qemu gérées par OpenStack à se connecter sur l’hôte VirtualBox
Autoriser le VLAN 172.24.4.0/24 à se connecter à 192.168.56.0/24
iptables -t nat -I POSTROUTING -o enp0s8 -d 192.168.56.0/24 -j MASQUERADE iptables -I FORWARD -d 192.168.56.0/24 -j ACCEPT
Policy
/etc/neutron/policy.json
{ "context_is_admin": "role:admin or user_name:neutron", "create_address_scope": "admin_only", "create_network": "rule:admin_only", "create_network:port_security_enabled": "rule:admin_only", "create_rbac_policy": "rule:admin_only", "create_router": "rule:admin_only", "create_security_group": "rule:admin_only", "create_security_group_rule": "rule:admin_only", "create_trunk": "rule:admin_only", "create_floatingip": "rule:admin_only", "create_floatingip:floating_ip_address": "rule:admin_only" }
