Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
F #196
Browse files Browse the repository at this point in the history
Signed-off-by: Petr Ospalý <[email protected]>
  • Loading branch information
Petr Ospalý committed Mar 31, 2020
1 parent a9c2d6d commit ca49ee7
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 4 deletions.
10 changes: 9 additions & 1 deletion src/lib/udev/rules.d/65-context.rules##apk.one
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# On NIC hogplug the delayed reconfiguration is triggered.
# On NIC hotplug the delayed reconfiguration is triggered.
SUBSYSTEM=="net", ACTION=="add", \
RUN+="/bin/sh -c 'echo >> /var/run/one-context/context.sh.local && echo >> /var/run/one-context/context.sh.network'"
SUBSYSTEM=="net", ACTION=="add", \
RUN+="/sbin/service one-context-reconfigure-delayed restart"

# On NIC detach - workaround for the older OpenNebula versions <5.10.2
SUBSYSTEM=="net", ACTION=="remove", \
RUN+="/bin/sh -c 'echo >> /var/run/one-context/context.sh.local && echo >> /var/run/one-context/context.sh.network'"
SUBSYSTEM=="net", ACTION=="remove", \
RUN+="/sbin/service one-context-reconfigure-delayed restart"

# On CONTEXT CD-ROM change the immediate reconfiguration is triggered.
Expand Down
11 changes: 10 additions & 1 deletion src/lib/udev/rules.d/65-context.rules##deb.one
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# On NIC hogplug the delayed reconfiguration is triggered.
# On NIC hotplug the delayed reconfiguration is triggered.
SUBSYSTEM=="net", ACTION=="add", \
RUN+="/bin/sh -c 'echo >> /var/run/one-context/context.sh.local && echo >> /var/run/one-context/context.sh.network'"
SUBSYSTEM=="net", ACTION=="add", \
TAG+="systemd", ENV{SYSTEMD_WANTS}+="one-context-reconfigure-delayed.service", \
RUN+="/usr/bin/timeout 5 /usr/sbin/service one-context-reconfigure-delayed start"

# On NIC detach - workaround for the older OpenNebula versions <5.10.2
SUBSYSTEM=="net", ACTION=="remove", \
RUN+="/bin/sh -c 'echo >> /var/run/one-context/context.sh.local && echo >> /var/run/one-context/context.sh.network'"
SUBSYSTEM=="net", ACTION=="remove", \
TAG+="systemd", ENV{SYSTEMD_WANTS}+="one-context-reconfigure-delayed.service", \
RUN+="/usr/bin/timeout 5 /usr/sbin/service one-context-reconfigure-delayed start"

Expand Down
10 changes: 9 additions & 1 deletion src/lib/udev/rules.d/65-context.rules##rpm.systemd.one
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# On NIC hogplug the delayed reconfiguration is triggered.
# On NIC hotplug the delayed reconfiguration is triggered.
SUBSYSTEM=="net", ACTION=="add", \
RUN+="/bin/sh -c 'echo >> /var/run/one-context/context.sh.local && echo >> /var/run/one-context/context.sh.network'"
SUBSYSTEM=="net", ACTION=="add", \
TAG+="systemd", ENV{SYSTEMD_WANTS}+="one-context-reconfigure-delayed.service"

# On NIC detach - workaround for the older OpenNebula versions <5.10.2
SUBSYSTEM=="net", ACTION=="remove", \
RUN+="/bin/sh -c 'echo >> /var/run/one-context/context.sh.local && echo >> /var/run/one-context/context.sh.network'"
SUBSYSTEM=="net", ACTION=="remove", \
RUN+="/bin/systemctl --no-block start one-context-reconfigure-delayed.service"

# When CONTEXT CD-ROM is changed, it generates 2 events. This rule takes
# every second event and triggers systemd service one-context-reconfigure.
# This service also stops any existing delayed reconfiguration.
Expand Down
10 changes: 9 additions & 1 deletion src/lib/udev/rules.d/65-context.rules##rpm.sysv.one
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# On NIC hogplug the delayed reconfiguration is triggered.
# On NIC hotplug the delayed reconfiguration is triggered.
SUBSYSTEM=="net", ACTION=="add", \
RUN+="/bin/sh -c 'echo >> /var/run/one-context/context.sh.local && echo >> /var/run/one-context/context.sh.network'"
SUBSYSTEM=="net", ACTION=="add", \
RUN+="/sbin/service one-context-reconfigure-delayed start"

# On NIC detach - workaround for the older OpenNebula versions <5.10.2
SUBSYSTEM=="net", ACTION=="remove", \
RUN+="/bin/sh -c 'echo >> /var/run/one-context/context.sh.local && echo >> /var/run/one-context/context.sh.network'"
SUBSYSTEM=="net", ACTION=="remove", \
RUN+="/sbin/service one-context-reconfigure-delayed start"

# Handle disk resize
Expand Down

1 comment on commit ca49ee7

@GitCop
Copy link

@GitCop GitCop commented on ca49ee7 Mar 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were the following issues with your Pull Request

  • Subject needs to conform to "%{type} #%{issue_number}: %{description}"

Guidelines are available at https://github.com/OpenNebula/one/blob/master/share/doc/dev/COMMIT_MESSAGES.md


This message was auto-generated by https://gitcop.com

Please sign in to comment.