Table des matières
- 2026:
- 2025:
12 billet(s) pour novembre 2026
| Notes conversion JSON YAML | 2026/11/13 11:16 | Jean-Baptiste |
| Git commit perdu | 2026/11/12 18:16 | Jean-Baptiste |
| Notes mojo lang | 2026/11/11 20:34 | Jean-Baptiste |
| Notes rust lang compilation | 2026/11/11 18:35 | Jean-Baptiste |
| Mémoire VSIZE VMSIZE SEGV lang C | 2026/11/11 15:59 | Jean-Baptiste |
| Ansible-navigator utilisation de ansible-vault | 2026/11/06 11:33 | Jean-Baptiste |
| Err Ansible - Module result deserialization failed No start of json char found | 2026/11/06 09:09 | Jean-Baptiste |
| Script Python conversion JSON vers CSV | 2026/11/06 08:14 | Jean-Baptiste |
| Filter Incoming IPv4 Packets Containing IP Options - cve-2026-98432 mitigation - Kernel TCP Use-After-Free | 2026/11/04 21:04 | Jean-Baptiste |
| Notes ZFS | 2026/11/03 18:04 | Jean-Baptiste |
| Diff image container | 2026/11/03 16:30 | Jean-Baptiste |
| Notes processus multi-thread | 2026/11/03 10:59 | Jean-Baptiste |
Podman NFS rootless
Voir aussi :
Source et explications : https://www.redhat.com/en/blog/rootless-podman-nfs
Changer
~/.config/containers/storage.conf
[storage] driver = "overlay" runroot = "/run/user/1000" graphroot = "/home/myuser/.local/share/containers/storage"
En
[storage] driver = "overlay" runroot = "/run/user/1000" graphroot = "/var/tmp/myuser/containers/storage
Ou créer un FS
truncate -s 10g /home/myuser/xfs.img mkfs.xfs -m reflink=1 /home/myuser/xfs.img mount /home/myuser/xfs.img /home/myuser/.local/share/containers
Autres
--userns=keep-id
ignore_chmod_errors = "true" in storage.conf
~/.config/containers/storage.conf
[storage] driver="overlay" [storage.options] mount_program = "/usr/bin/fuse-overlayfs" [storage.options.overlay] mountopt="xattr_permissions=2,threaded=1"
Pb cgroup controllers not delegated to non-privileged users - SystemD delegate failed - cgroupControllers
Voir aussi :
$ podman info --format '{{json .}}' | jq .host.cgroupControllers [] $ cat /sys/fs/cgroup/user.slice/user-1003.slice/cgroup.controllers $ cat /sys/fs/cgroup/user.slice/user-$(id -u).slice/user@$(id -u).service/cgroup.controllers
/etc/systemd/system/user-0.slice
[Unit] Before=systemd-logind.service [Slice] Slice=user.slice [Install] WantedBy=multi-user.target
/etc/systemd/system/user@.service.d/delegate.conf
[Service] Delegate=cpu cpuset io memory pids
/etc/systemd/system/user-.slice.d/override.conf
[Slice] CPUAccounting=yes MemoryAccounting=yes IOAccounting=yes TasksAccounting=yes
chmod a+r /etc/systemd/system/user-0.slice chmod a+r /etc/systemd/system/user@.service.d/delegate.conf chmod a+r /etc/systemd/system/user-.slice.d/override.conf systemctl daemon-reload
systemctl --user daemon-reload
Vérif (avec le compte utilisateur)
cat /sys/fs/cgroup/user.slice/user-$(id -u).slice/user@$(id -u).service/cgroup.controllers
$ cat /sys/fs/cgroup/user.slice/user-1000.slice/cgroup.controllers
cpuset cpu io memory pids
$ podman info --format '{{json .}}' | jq .host.cgroupControllers
[
"cpuset",
"cpu",
"io",
"memory",
"pids"
]
Autres
Pour information : /usr/lib/systemd/system/user-.slice.d/10-defaults.conf
# SPDX-License-Identifier: LGPL-2.1+ # # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] Description=User Slice of UID %j After=systemd-user-sessions.service StopWhenUnneeded=yes [Slice] TasksMax=80%
Trouver les fichiers dupliqués - double - doublon
find . -not -empty -type f -exec md5sum {} \; | sort | uniq -w32 -dD
Avec fdupes (voir aussi jdupes)
fdupes -rnN OpsMilori OpsMilori2
Pb encodage fichier ansible-lint yamllint
Erreurs
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 824: invalid continuation byte
iconv: illegal input sequence at position 824
ansible-lint plante lors de l'analyse d'un fichier YAML
Aucune erreur avec yamllint (parce qu'il ne fait pas les includes)
ansible-lint --offline app/plop.yml
Analyse et solution
$ strace --trace=%file ansible-lint --offline app/plop.yml
---
stat("/data/ansible/roles/app1/tasks/inventory_plugins", 0x7ffc4f077930) = -1 ENOENT (No such file or directory)
stat("/data/ansible/roles/app1/tasks/httpapi_plugins", 0x7ffc4f077930) = -1 ENOENT (No such file or directory)
stat("/data/ansible/roles/app1/tasks/become_plugins", 0x7ffc4f077930) = -1 ENOENT (No such file or directory)
getcwd("/data/ansible/playbooks", 1024) = 24
getcwd("/data/ansible/playbooks", 1024) = 24
getcwd("/data/ansible/playbooks", 1024) = 24
stat("/data/ansible/roles/plop/tasks/main.yml", {st_mode=S_IFREG|0640, st_size=1002, ...}) = 0
openat(AT_FDCWD, "/data/ansible/roles/plop/tasks/main.yml", O_RDONLY|O_CLOEXEC) = 6
Traceback (most recent call last):
File "/data/venv-ansible/lib64/python3.9/site-packages/ansible/parsing/utils/yaml.py", line 72, in from_yaml
openat(AT_FDCWD, "/data/venv-ansible/lib64/python3.9/site-packages/ansible/parsing/utils/yaml.py", O_RDONLY|O_CLOEXEC) = 6
new_data = json.loads(data, cls=AnsibleJSONDecoder)
File "/usr/lib64/python3.9/json/__init__.py", line 359, in loads
openat(AT_FDCWD, "/usr/lib64/python3.9/json/__init__.py", O_RDONLY|O_CLOEXEC) = 6
return cls(**kw).decode(s)
File "/usr/lib64/python3.9/json/decoder.py", line 337, in decode
openat(AT_FDCWD, "/usr/lib64/python3.9/json/decoder.py", O_RDONLY|O_CLOEXEC) = 6
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.9/json/decoder.py", line 355, in raw_decode
openat(AT_FDCWD, "/usr/lib64/python3.9/json/decoder.py", O_RDONLY|O_CLOEXEC) = 6
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/data/venv-ansible/bin/ansible-lint", line 8, in <module>
openat(AT_FDCWD, "/data/venv-ansible/bin/ansible-lint", O_RDONLY|O_CLOEXEC) = 6
---
$ file /data/ansible/roles/plop/tasks/main.yml /data/ansible/roles/plop/tasks/main.yml: ISO-8859 text
$ yamllint /data/ansible/roles/plop/tasks/main.yml
Traceback (most recent call last):
File "/data/venv-ansible/bin/yamllint", line 8, in <module>
sys.exit(run())
File "/data/venv-ansible/lib64/python3.9/site-packages/yamllint/cli.py", line 227, in run
prob_level = show_problems(problems, file, args_format=args.format,
File "/data/venv-ansible/lib64/python3.9/site-packages/yamllint/cli.py", line 102, in show_problems
for problem in problems:
File "/data/venv-ansible/lib64/python3.9/site-packages/yamllint/linter.py", line 191, in _run
buffer = decoder.auto_decode(buffer)
File "/data/venv-ansible/lib64/python3.9/site-packages/yamllint/decoder.py", line 71, in auto_decode
return stream_data.decode(encoding=detect_encoding(stream_data))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 824: invalid continuation byte
Diffing
$ diff <(cat -A /data/ansible/roles/plop/tasks/main.yml) <(cat /data/ansible/roles/plop/tasks/main.yml | sed -e 's/$/$/')
26c26
< guest_source_file_path: 'C:\\Users\\{{ vm_app_user }}\\Desktop\\DM-imarrage CIE*'$
---
> guest_source_file_path: 'C:\\Users\\{{ vm_app_user }}\\Desktop\\Dmarrage CIE*'$
29c29
< vm_admin_password: "{{ vm_app_password }}"
\ No newline at end of file
---
> vm_admin_password: "{{ vm_app_password }}"$
$ iconv -t utf-8 /data/ansible/roles/plop/tasks/main.yml > /data/ansible/roles/plop/tasks/main.yml.new iconv: illegal input sequence at position 824
iconv -f iso-8859-15 -t utf-8 /data/ansible/roles/plop/tasks/main.yml > /data/ansible/roles/plop/tasks/main.yml.new mv /data/ansible/roles/plop/tasks/main.yml /data/ansible/roles/plop/tasks/main.yml.bad mv /data/ansible/roles/plop/tasks/main.yml.new /data/ansible/roles/plop/tasks/main.yml
$ yamllint /data/ansible/roles/plop/tasks/main.yml.new /data/ansible/roles/plop/tasks/main.yml.new 3:16 error trailing spaces (trailing-spaces) 26:81 error line too long (83 > 80 characters) (line-length) 29:47 error no new line character at the end of file (new-line-at-end-of-file)
PS : pour ansible-lint il est important que le fichier ait l’extension yml ou yaml.
