Browse Source

Add fix for floating IPs

Depends-On: Ic5eb4b4308feba55cbb97ebc63c1a41b4ed14de8
Change-Id: I2b3eb8b283c6294bae73e8765da44aefef1a1561
Closes-Bug: 1623048
Pavel Chechetin 2 years ago
parent
commit
3c0e78bc86

+ 15
- 0
deployment/puppet/octane_tasks/files/neutron_migrations_for_fuel_8 View File

@@ -0,0 +1,15 @@
1
+INSERT INTO networksecuritybindings
2
+SELECT id, 1
3
+FROM networks
4
+WHERE id NOT IN (SELECT network_id FROM networksecuritybindings);
5
+
6
+UPDATE ml2_network_segments
7
+SET network_type='flat',physical_network='physnet1'
8
+WHERE network_id IN (SELECT network_id FROM externalnetworks);
9
+
10
+INSERT INTO ml2_flat_allocations
11
+SELECT b.* FROM (SELECT 'physnet1') AS b
12
+WHERE NOT EXISTS (
13
+  SELECT 1 FROM ml2_flat_allocations
14
+  WHERE physical_network = 'physnet1'
15
+)

+ 14
- 0
deployment/puppet/octane_tasks/graphs/seed/upgrade-db.yaml View File

@@ -77,3 +77,17 @@
77 77
     puppet_manifest: /etc/fuel/octane/puppet/octane_tasks/modular/db_sync.pp
78 78
     puppet_modules:  /etc/fuel/octane/puppet:/etc/puppet/modules
79 79
     timeout: 360
80
+
81
+# Should be applied only on 6.0-7.0 -> 9.1+
82
+- id: neutron_migrations_for_fuel_8
83
+  type: puppet
84
+  version: 2.1.0
85
+  groups: [primary-controller]
86
+  requires: [rsync_octane, db_sync]
87
+  required_for: []
88
+  condition:
89
+    yaql_exp: "$.upgrade.relation_info.orig_cluster_version =~ '[6-7]\.[0-1]' and $.upgrade.relation_info.seed_cluster_version =~ '9\.[1-9]'"
90
+  parameters:
91
+    puppet_manifest: /etc/fuel/octane/puppet/octane_tasks/modular/neutron_migrations_for_fuel_8.pp
92
+    puppet_modules:  /etc/fuel/octane/puppet:/etc/puppet/modules
93
+    timeout: 360

+ 17
- 0
deployment/puppet/octane_tasks/manifests/neutron_migrations_for_fuel_8.pp View File

@@ -0,0 +1,17 @@
1
+# == Class: octane_tasks::neutron_migrations_for_fuel_8
2
+#
3
+# This class is for fixing an issue with floating IPs (the issue has been introduced in Fuel 8.0)
4
+# The issue is in Fuel 8.0 timeframe external network type has been switched from local to flat
5
+# which renders all already allocated floating IPs useless.
6
+#
7
+class octane_tasks::neutron_migrations_for_fuel_8 {
8
+  file { '/tmp/neutron_migrations_for_fuel_8':
9
+    source => 'puppet:///modules/octane_tasks/neutron_migrations_for_fuel_8',
10
+  }
11
+
12
+  exec { 'mysql neutron < /tmp/neutron_migrations_for_fuel_8':
13
+    provider    => shell,
14
+    require     => File['/tmp/neutron_migrations_for_fuel_8'],
15
+    environment => 'HOME=/root',
16
+  }
17
+}

+ 4
- 0
deployment/puppet/octane_tasks/manifests/params.pp View File

@@ -5,6 +5,7 @@
5 5
 class octane_tasks::params (
6 6
 ) {
7 7
   $nova_hash            = hiera_hash('nova')
8
+  $upgrade_hash         = hiera_hash('upgrade')
8 9
   $ceilometer_hash      = hiera_hash('ceilometer', {'enabled' => false})
9 10
   $sahara_hash          = hiera_hash('sahara', {'enabled' => false})
10 11
   $murano_hash          = hiera_hash('murano', {'enabled' => false})
@@ -21,6 +22,9 @@ class octane_tasks::params (
21 22
   $ironic_enabled         = $ironic_hash['enabled']
22 23
   $cinder_vol_on_ctrl     = $storage_hash['volumes_ceph']
23 24
 
25
+  $orig_version = $upgrade_hash['relation_info']['orig_cluster_version']
26
+  $seed_version = $upgrade_hash['relation_info']['seed_cluster_version']
27
+
24 28
   # Nova
25 29
   $nova_services_list = [
26 30
     'nova-api',

+ 3
- 0
deployment/puppet/octane_tasks/modular/neutron_migrations_for_fuel_8.pp View File

@@ -0,0 +1,3 @@
1
+notice('MODULAR: octane_tasks/neutron_migrations_for_fuel_8.pp')
2
+
3
+include ::octane_tasks::neutron_migrations_for_fuel_8

Loading…
Cancel
Save