neutron-l3-agent revision 5403
5403N/A# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. 2521N/A# Licensed under the Apache License, Version 2.0 (the "License"); you may 2521N/A# not use this file except in compliance with the License. You may obtain 2521N/A# Unless required by applicable law or agreed to in writing, software 2521N/A# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 2521N/A# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 2521N/A# License for the specific language governing permissions and limitations 3998N/A print "failed to retrieve hostmodel ipadm property" 3998N/A print "failed to set ipadm hostmodel property to %s" %
value 2521N/A print '%s does not exist or is not readable' % f
2583N/A # System-wide forwarding (either ipv4 or ipv6 or both) must be enabled 2583N/A # before neutron-l3-agent can be started. 2583N/A print "failed to determine if IPv4 forwarding is enabled or not" 2583N/A print "failed to determine if IPv6 forwarding is enabled or not" 2892N/A print "System-wide IPv4 or IPv6 (or both) forwarding must be " \
2892N/A "enabled before enabling neutron-l3-agent" 5403N/A # The VPNaaS shutdown should unplumb all IP tunnels it created. But 5403N/A # be paranoid and check for lingering tunnels created by OpenStack 5403N/A # that may have been left behind if the OpenStack device driver exits 5403N/A # unexpectedly. OpenStack VPN configuration is created when the service 5403N/A # starts. Errors will occur if old IP tunnels still exist. 5403N/A print "Error: Found existing IP tunnel interface(s)." 5403N/A print "Then use svcadm(1M) to clear the service." 5403N/A print "Use the following commands to remove:" 5403N/A print "\t# ipadm delete-ip %s; dladm delete-iptun %s" %
(ifn, ifn) 3998N/A # set the hostmodel property if necessary 2944N/A # remove IP Filter rules added by neutron-l3-agent 2944N/A print "failed to retrieve IP Filter rules" 2944N/A # L3 agent IP Filter rules are of the form 2944N/A # block in quick on l3i64cbb496_a_0 from ... to pool/15417332 2944N/A # remove the IP Filter rule 2944N/A print "failed to remove IP Filter rule %s: %s" %
(ipf, err) 2944N/A # remove IP Pools added by neutron-l3-agent 2892N/A # first kill the SMF contract 2892N/A print "failed to kill the SMF contract: %s" %
(err) 3162N/A # We need to first remove the IP filter rules and then remove 3162N/A # the IP interfaces on which the rules were applied. 2944N/A # remove IPv4 Filter rules added by neutron-l3-agent 2944N/A # remove IPv6 Filter rules added by neutron-l3-agent 2892N/A # remove IP NAT rules added by neutron-l3-agent 2892N/A print "failed to retrieve IP NAT rules" 2892N/A # L3 agent IP NAT rules are of the form 3998N/A # bimap l3e64ccc496_a_0 .... OR 3998N/A # rdr l3iedf345cc96_a_0 .... 3162N/A # remove VNICs associated with L3 agent 3162N/A print "failed to retrieve IP interface names" 3162N/A # L3 agent datalinks are always 15 characters in length. They start 3162N/A # with either 'l3i' or 'l3e', end with '_0', and in between they are 3162N/A print "failed to remove datalinks used by L3 agent: %s" %
(err) 3998N/A # finally reset the hostmodel property