Outils pour utilisateurs

Outils du site


blog

Notes Dell OpenManage

OpenManage dans un container Docker

Voir https://hub.docker.com/r/jdelaros1/openmanage-snmp/

Utilisateur Mot de passe
root password

Il convient seulement de remplacer la ligne suivante :

RUN wget -q -O - http://linux.dell.com/repo/hardware/DSU_16.02.00/bootstrap.cgi | bash

Par

RUN wget -q -O - http://linux.dell.com/repo/hardware/DSU_17.03.00/bootstrap.cgi | bash

ou encore par

RUN wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash

Dockerfile

FROM centos:centos7
 
#MAINTAINER Jose De la Rosa "https://github.com/jose-delarosa"
#LABEL org.opencontainers.image.authors="Jose De la Rosa https://github.com/jose-delarosa"
 
#ENV http_proxy http://192.168.56.1:3128
#ENV https_proxy http://192.168.56.1:3128
 
ARG https_proxy
ARG http_proxy
 
# Environment variables
ENV PATH $PATH:/opt/dell/srvadmin/bin:/opt/dell/srvadmin/sbin
ENV USER root
ENV PASS password
 
# Do overall update and install missing packages needed for OpenManage
RUN yum -y update && \
    yum -y install gcc wget perl passwd which tar libstdc++.so.6 compat-libstdc++-33.i686 glibc.i686
 
# Set login credentials
RUN echo "$USER:$PASS" | chpasswd
 
# Add OMSA repo
#RUN wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash
RUN wget -q -O - http://linux.dell.com/repo/hardware/DSU_17.03.00/bootstrap.cgi | bash
 
# Let's "install all", however we can select specific components instead
RUN yum -y install srvadmin-all && yum clean all
 
# Prevent daemon helper scripts from making systemd calls
ENV SYSTEMCTL_SKIP_REDIRECT=1
 
# Restart application to ensure a clean start
CMD /usr/sbin/snmpd && srvadmin-services.sh restart && tail -f /opt/dell/srvadmin/var/log/openmanage/dcsys64.xml

Build

docker build -t omsa82-snmp --build-arg http_proxy=http://192.168.56.1:3128 --build-arg https_proxy=http://192.168.56.1:3128 .

Lancement

# Sur port 161/udp
#docker run --privileged --userns=host -d -p 161:161/udp -p 1311:1311 --restart=always --net=host -v /lib/modules/`uname -r`:/lib/modules/`uname -r` --name=omsa82-snmp jdelaros1/openmanage-snmp
 
# Sur un autre port
#docker run --privileged --userns=host -d -p 160:161/udp -p 1311:1311 --restart=always -v /lib/modules/`uname -r`:/lib/modules/`uname -r` --name=omsa82-snmp jdelaros1/openmanage-snmp
docker run --privileged --userns=host -d -p 160:161/udp -p 1311:1311 --restart=always -v /lib/modules/`uname -r`:/lib/modules/`uname -r` --name=omsa82-snmp docker.io/jdelaros1/openmanage-snmp
Test RedHat8 OMSA 9.2

Ne fonctionne pas !

vars.sh

export KERN_RELEASE=$(uname -r)
export PASS=P@ssw0rd
 
export http_proxy=http://192.168.22.20:3128
export https_proxy=http://192.168.22.20:3128

Dockerfile

FROM centos:centos8
 
#MAINTAINER Jose De la Rosa "https://github.com/jose-delarosa"
#LABEL org.opencontainers.image.authors="Jose De la Rosa https://github.com/jose-delarosa"
 
ARG http_proxy
ARG https_proxy
ARG PASS
 
# Environment variables
ENV PATH $PATH:/opt/dell/srvadmin/bin:/opt/dell/srvadmin/sbin
ENV USER root
#ENV PASS password
 
# Do overall update and install missing packages needed for OpenManage
#RUN yum -y update
RUN yum -y install gcc wget perl passwd which tar net-snmp initscripts
 
# Set login credentials
RUN echo "$USER:$PASS" | chpasswd
 
# Add OMSA repo
#RUN wget -q -O - https://linux.dell.com/repo/hardware/latest/bootstrap.cgi | sed -e '/^IMPORT_GPG_CONFIRMATION="na"/s/na/yes/' | bash
RUN wget -q -O - http://linux.dell.com/repo/hardware/DSU_20.02.00/bootstrap.cgi | sed -e '/^IMPORT_GPG_CONFIRMATION="na"/s/na/yes/' | bash
 
# Let's "install all", however we can select specific components instead
RUN yum -y install srvadmin-all && yum clean all
 
 
# Restart application to ensure a clean start
CMD /usr/sbin/snmpd && srvadmin-services.sh restart
 
#/etc/init.d/dataeng start
#/etc/init.d/dsm_om_connsvc start
#/etc/init.d/dsm_om_shrsvc start

docker-compose.yml

version: "3.7"
 

services:
  openmanage:
    privileged: true
    build:
      context: .
      args:
        - http_proxy=http://172.18.22.20:3128
        - https_proxy=http://172.18.22.20:3128
        - PASS=$PASS
      network: host
    network_mode: "host"
    ports:
      - "1311:1311"
      - "161:161/udp"
    volumes:
      - /lib/modules/$KERN_RELEASE:/lib/modules/$KERN_RELEASE:ro
      - /dev/:/dev/
Vérification

https://localhost:1311

omreport chassis fans
Modification / Mis-à-jour
srvadmin-services.sh stop
rpm -e $(rpm -qa | grep srvadmin)
wget http://linux.dell.com/repo/hardware/DSU_17.03.00/os_dependent/RHEL7_64/srvadmin/srvadmin-jre-8.4.0-2193.9883.el7.x86_64.rpm
mkdir plop
cd plop
tar xzvf ../OM-SrvAdmin-Dell-Web-LX-8.5.0-2372.RHEL7.x86_64_A00.tar.gz
cd linux/RPMS/supportRPMS/srvadmin/RHEL7/x86_64
yum install net-snmp-utils # net-snmp net-snmp-agent net-snmp-libs net-snmp-utils
rpm -Uvh *.rpm
ldconfig
srvadmin-services.sh start
Pb
Pb 1
Starting dsm_sa_datamgrd: /opt/dell/srvadmin/sbin/dsm_sa_datamgrd: error while loading shared libraries: libdcsupt.so.8: cannot open shared object file: No such file or directory
                                                           [FAILED]
Starting dsm_sa_eventmgrd: /opt/dell/srvadmin/sbin/dsm_sa_eventmgrd: error while loading shared libraries: libdcsupt.so.8: cannot open shared object file: No such file or directory
                                                           [FAILED]
Starting dsm_sa_snmpd: /opt/dell/srvadmin/sbin/dsm_sa_snmpd: error while loading shared libraries: libdcsupt.so.8: cannot open shared object file: No such file or directory
                                                           [FAILED]
Starting DSM SA Shared Services:                           [  OK  ]
Starting DSM SA Connection Service:                        [  OK  ]
tail: cannot open ‘/opt/dell/srvadmin/var/log/openmanage/dcsys64.xml’ for reading: No such file or directory

Solution

ldconfig

Par info

# rpm -qf /opt/dell/srvadmin/lib64/libdcsupt.so.8
srvadmin-deng-8.2.0-1739.8348.el7.x86_64
Pb 2
# docker exec -ti omsa82-snmp omreport chassis fans
Error! No fan probes found on this system.

Solution : Version plus récente de Dell openmanage

Supervision

Pb
# /usr/lib64/nagios/plugins/check_openmanage -H 172.18.205.2
SNMP ERROR [cooling]: The requested entries are empty or do not exist

Le pb vient d'openmanage, peut-être la version n'est pas assez récente

La commande suivante doit fonctionner

omreport chassis fans
2025/03/24 15:06

Notes debmirror

Voir :

Voir aussi :

Bug rsync même pour http/ftp :

cp -p /usr/bin/debmirror{,.old}

/usr/bin/debmirror

#! /bin/bash
 
/usr/bin/debmirror.old --rsync-extra=none $*

Exemple de fichier de conf

/etc/debmirror.conf

# Output options
$verbose=1;
$progress=1;
$debug=1;
 
 
# Download options
$host="archive.ubuntu.com";
 
#$user="anonymous";
#$passwd="anonymous@";
#$remoteroot="debian";
#$download_method="ftp";
$download_method="http";
 
 
#@sections="main,main/debian-installer,contrib,non-free";
@sections="main,debian-installer,contrib,non-free";
@arches="amd64";
 
 
$omit_suite_symlinks=0;
$skippackages=0;
$i18n=0;
$getcontents=0;
$do_source=1;
$max_batch=0;
$state_cache_days=0;
 
 
# Security/Sanity options
 
# C'était quoi la config par défault déjà ?
#$ignore_release_gpg=1;
 
$ignore_release=0;
$check_md5sums=0;
$ignore_small_errors=0;
 
# C'était quoi la config par défault déjà ?
$cleanup=1;
$post_cleanup=1;
 
$timeout=300;
 
#$proxy="http://proxy:8080/";
 
$dry_run=0;
$diff_mode="use";
 
# The config file must return true or perl complains.
# Always copy this.
1;

Debmirror pour Cobbler

Laisser la conf par défaut. Juste commenter les lignes suivantes @dists= et @arches= :

/etc/debmirror.conf

@dists="sid";
@arches="i386";

Devient /etc/debmirror.conf

#@dists="sid";
#@arches="i386";

Puis si cobbler check affiche toujours un avertissement sur debmirror, redémarrer le service cobblerd

Miroir Debian complet

maj_depoots_debian.sh

#!/bin/bash -x
## Simple debmirror update script 
http_proxy="http://user:P@ssw0rd@192.168.56.1:3128/"
hote="ftp.fr.debian.org"
racine="debian/"
methode="rsync"
#distribution="jessie,jessie-updates,wheezy,wheezy-updates"
distribution="stretch"
#sections="main,main/debian-installer,contrib,non-free"
sections="main,contrib,non-free"
destination="/media/cache/debian9/"
#architecture="amd64,i386,armhf"
architecture="amd64"
 
## Synchronisation du mirroir local avec ftp.fr.debian.org
/usr/bin/debmirror --i18n --nosource -m -e --passive --host=$hote --root=$racine --method=$methode --getcontents --progress --dist=$distribution --ignore-release-gpg --section=$sections --arch=$architecture --cleanup --diff=none $destination

Autres

Exemples
debmirror --nosource --progress --md5sums -h ftp.fr.debian.org -e rsync -r :debian -d testing --getcontents /home/debian_mirror/ --ignore-release-gpg
 
debmirror -v --method=http -a amd64 --no-check-gpg --exclude='/*' --include='/python3-websocket.*$' -d bionic,bionic-security,bionic-updates --nosource mirror
 
debmirror --method=http --host=ppa.launchpad.net --root=wgrant/experimental/ubuntu --dist xenial --section=main --arch=amd64 --rsync-extra=none --i18n --verbose --ignore-release-gpg tmp-wgrant-experimental
2025/03/24 15:06

auth agent - Disable gnome from asking passphrase in GUI when using ssh from terminal

Source https://askubuntu.com/questions/858347/disable-gnome-from-asking-passphrase-in-gui-when-using-ssh-and-gpg-from-terminal

$ ps -ef | grep key
jean      1674  1476  0 Mar18 ?        00:00:00 lxqt-globalkeysd        
jean     18336  1458  0 10:05 ?        00:00:00 /usr/bin/gnome-keyring-daemon --start --foreground --components=secrets
$ killall gnome-keyring-daemon
sudo apt install pinentry-curses
sudo apt-get purge pinentry-gnome3
sudo update-alternatives --config pinentry
2025/03/24 15:06

Notes debian SSL/TLS

Fichiers :

  • /etc/ssl/certs/ssl-cert-snakeoil.pem
  • /etc/ssl/private/ssl-cert-snakeoil.key

The certificate and key make be regenerated manually with the following command :

apt-get install ssl-cert
make-ssl-cert generate-default-snakeoil --force-overwrite

FIXME

2025/03/24 15:06
blog.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki