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