Comments (5)
@baby-gnu using DNS_HOSTNAME the network has to be up before the hostname can be found.
I played around with a systemd unit for the context, and the best working version did:
After=network
Before=ssh
This avoids some major race conditions but even then you can have apache or databases start up with an invalid hostname.
I left the 'service network restart' in the network context intact for this reason.
Haven't seen bad consequences like this anymore.
The second part (multi-user) is very desirable, yeah.
from addon-context-linux.
I made some tests and I have the following .service
for contextualisation:
[Unit]
# Remove default dependencies or it will not work
DefaultDependencies=no
# We wants network-pre.target as we are a provider
# See man systemd.special(7) - SPECIAL PASSIVE SYSTEM UNITS
Before=network-pre.target
Wants=network-pre.target
# Make sure to have filesystem mounted since we remove default dependencies.
After=local-fs.target
...
[Install]
WantedBy=networking.service
and the second part is much more simple:
[Unit]
After=multi-user.target
...
[Install]
WantedBy=multi-user.target
from addon-context-linux.
Hi @baby-gnu and @FlorianHeigl, by older commit 93cb488 I tried to split the contextualization scripts into pre and post networking. For now, only the Systemd is done, the SysV init scripts needs to be fixed before next release. Just letting you know in case you want to try it or discuss the change. Thank you!
from addon-context-linux.
Thx @vholer i very much want to test them!
from addon-context-linux.
The second part (SysV and Upstart) is covered by recent PR #74. I think it's done for now and I'll close this issue. If you experience any problem (at least I think there is still space for play with the init script dependencies), please open a new one. Thank you!
from addon-context-linux.
Related Issues (20)
- syslog service should be restarted after hostname is set by net-15-hostname
- Non-systemd based Debians don't periodically recontextualize on vCenter
- FreeBSD doesn't periodically recontextualize on vCenter
- growpart does not work if local is not english
- Onesysprep deletes `/var/log/wtmp` which prevents `last` command from working on CentOS/RHEL7 HOT 2
- Merge/drop pending PRs in addon-context HOT 1
- Solve/Close some issues in addon-context-linux HOT 1
- Allow user to disable automatic Swap mounting HOT 1
- Any long running process started by `START_SCRIPT` will block OS boot HOT 1
- `GROW_ROOTFS` fails when rootfs is btrfs (e.g. Fedora 35) HOT 1
- Add EL9 support
- Option to add static routes to the network contextualization HOT 1
- Automatically add static route for onegate-proxy HOT 2
- Drop testing/rolling releases
- Document keepalived notify script
- Disk Resize might break FreeBSD HOT 1
- Fedora random boot freeze, Fedora 38 pending HOT 3
- Add static routes HOT 1
- Deb package depends ifupdown or ifupdown2 even if netplan is installed instead HOT 2
- AlmaLinux 9 and Opennebula 6.4.x HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from addon-context-linux.