Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions chef/data_bags/crowbar/migrate/cinder/048_nfs_backend.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
def upgrade(ta, td, a, d)
a["volume_defaults"]["nfs"] = ta["volume_defaults"]["nfs"]
return a, d
end

def downgrade(ta, td, a, d)
a["volume_defaults"].delete("nfs")
return a, d
end
13 changes: 13 additions & 0 deletions chef/data_bags/crowbar/migrate/cinder/049_use_multipath.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
def upgrade(ta, td, a, d)
unless a.key? "use_multipath"

Choose a reason for hiding this comment

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

Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)

a["use_multipath"] = ta["use_multipath"]
end
return a, d
end

def downgrade(ta, td, a, d)
unless ta.key? "use_multipath"

Choose a reason for hiding this comment

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

Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)

del a["use_multipath"]
end
return a, d
end
11 changes: 11 additions & 0 deletions chef/data_bags/crowbar/migrate/cinder/050_add_hitachi_options.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
def upgrade(ta, td, a, d)
unless a["volume_defaults"].key?("hitachi")
a["volume_defaults"]["hitachi"] = ta["volume_defaults"]["hitachi"]
end
return a, d
end

def downgrade(ta, td, a, d)
a["volume_defaults"].delete("hitachi") unless ta["volume_defaults"].key?("hitachi")
return a, d
end
21 changes: 21 additions & 0 deletions chef/data_bags/crowbar/migrate/neutron/056_add_rpc_workers.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
def upgrade(ta, td, a, d)
a["rpc_workers"] = ta["rpc_workers"] unless a.key?("rpc_workers")

# From 055_add_tunnel_csum.rb
a["ovs"] ||= {}
a["ovs"]["tunnel_csum"] = ta["ovs"]["tunnel_csum"]


Choose a reason for hiding this comment

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

Layout/EmptyLines: Extra blank line detected. (https://github.com/bbatsov/ruby-style-guide#two-or-more-empty-lines)

return a, d
end

def downgrade(ta, td, a, d)
a.delete("rpc_workers")

# From 055_add_tunnel_csum
if a.key?("ovs")

Choose a reason for hiding this comment

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

Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)

a["ovs"].delete("tunnel_csum")
end

return a, d
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
def upgrade(ta, td, a, d)
a["apic"] = ta["apic"] unless a.key? "apic"
return a, d
end

def downgrade(ta, td, a, d)
a.delete("apic") unless ta.key? "apic"
return a, d
end
31 changes: 31 additions & 0 deletions chef/data_bags/crowbar/migrate/nova/044_add_zvm_extra.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
def upgrade(ta, td, a, d)
z = a["zvm"]

unless z.key? "zvm_user_default_password"
z["zvm_user_default_password"] = ta["zvm"]["zvm_user_default_password"]
end
unless z.key? "zvm_user_default_privilege"
z["zvm_user_default_privilege"] = ta["zvm"]["zvm_user_default_privilege"]
end
unless z.key? "zvm_reachable_timeout"
z["zvm_reachable_timeout"] = ta["zvm"]["zvm_reachable_timeout"]
end

return a, d
end

def downgrade(ta, td, a, d)
z = a["zvm"]

unless ta["zvm"].key? "zvm_user_default_password"
z.delete("zvm_user_default_password")
end
unless ta["zvm"].key? "zvm_user_default_privilege"
z.delete("zvm_user_default_privilege")
end
unless ta["zvm"].key? "zvm_reachable_timeout"
z.delete("zvm_reachable_timeout")
end

return a, d
end
15 changes: 15 additions & 0 deletions chef/data_bags/crowbar/migrate/nova/045_add_zvm_xcat_network.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
def upgrade(ta, td, a, d)
unless a["zvm"].key? "zvm_xcat_network"

Choose a reason for hiding this comment

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

Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)

a["zvm"]["zvm_xcat_network"] = "admin"
end

return a, d
end

def downgrade(ta, td, a, d)
unless ta["zvm"].key? "zvm_xcat_network"

Choose a reason for hiding this comment

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

Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)

a["zvm"].delete("zvm_xcat_network")
end

return a, d
end
13 changes: 13 additions & 0 deletions chef/data_bags/crowbar/migrate/nova/046_add_cross_az_attach.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
def upgrade(ta, td, a, d)
unless a.key? "cross_az_attach"

Choose a reason for hiding this comment

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

Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)

a["cross_az_attach"] = ta["cross_az_attach"]
end
return a, d
end

def downgrade(ta, td, a, d)
unless ta.key? "cross_az_attach"

Choose a reason for hiding this comment

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

Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)

a.delete("cross_az_attach")
end
return a, d
end
13 changes: 13 additions & 0 deletions chef/data_bags/crowbar/migrate/nova/047_add_migration_network.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
def upgrade(ta, td, a, d)
unless a.key? "migration"

Choose a reason for hiding this comment

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

Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)

a["migration"] = ta["migration"]
end
return a, d
end

def downgrade(ta, td, a, d)
unless ta.key? "migration"

Choose a reason for hiding this comment

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

Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)

a.delete("migration")
end
return a, d
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
def upgrade(ta, td, a, d)
unless a.key? "image_cache_manager_interval"
a["image_cache_manager_interval"] = ta["image_cache_manager_interval"]
end
return a, d
end

def downgrade(ta, td, a, d)
unless ta.key? "image_cache_manager_interval"
a.delete("image_cache_manager_interval")
end
return a, d
end
32 changes: 31 additions & 1 deletion chef/data_bags/crowbar/template-cinder.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"pool_timeout": 30,
"rpc_response_timeout": 60,
"use_multi_backend": true,
"use_multipath": false,
"volume_defaults": {
"raw": {
"volume_name": "cinder-volumes",
Expand Down Expand Up @@ -72,6 +73,10 @@
"pool": "",
"iscsi_ip": ""
},
"nfs": {
"nfs_shares": "",
"nfs_mount_options": ""
},
"rbd": {
"use_crowbar": true,
"config_file": "/etc/ceph/ceph.conf",
Expand All @@ -89,6 +94,31 @@
"ca_file": "",
"insecure": false
},
"hitachi": {
"storage_protocol": "fc",
"hitachi_add_chap_user": false,
"hitachi_async_copy_check_interval": 10,
"hitachi_auth_method": "None",
"hitachi_auth_password": "HBSD-CHAP-password",
"hitachi_auth_user": "HBSD-CHAP-user",
"hitachi_copy_check_interval": 3,
"hitachi_copy_speed": 3,
"hitachi_default_copy_method": "FULL",
"hitachi_group_range": "None",
"hitachi_group_request": false,
"hitachi_horcm_add_conf": true,
"hitachi_horcm_numbers": "200,201",
"hitachi_horcm_password": "None",
"hitachi_horcm_resource_lock_timeout": 600,
"hitachi_horcm_user": "None",
"hitachi_ldev_range": "None",
"hitachi_pool_id": "None",
"hitachi_serial_number": "None",
"hitachi_target_ports": "None",
"hitachi_thin_pool_id": "None",
"hitachi_unit_name": "None",
"hitachi_zoning_request": false
},
"manual": {
"driver": "",
"config": ""
Expand Down Expand Up @@ -131,7 +161,7 @@
"cinder": {
"crowbar-revision": 0,
"crowbar-applied": false,
"schema-revision": 47,
"schema-revision": 50,
"element_states": {
"cinder-controller": [ "readying", "ready", "applying" ],
"cinder-volume": [ "readying", "ready", "applying" ]
Expand Down
67 changes: 67 additions & 0 deletions chef/data_bags/crowbar/template-cinder.schema
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"pool_timeout": { "type": "int", "required": true },
"rpc_response_timeout": { "type": "int", "required": true },
"use_multi_backend": { "type": "bool", "required": true },
"use_multipath": { "type": "bool", "required": true },
"volume_defaults": {
"type": "map",
"required": true,
Expand Down Expand Up @@ -96,6 +97,12 @@
"iscsi_ip": { "type": "str", "required": true }
}
},
"nfs": {
"type": "map", "mapping": {
"nfs_shares": { "type": "str", "required": true },
"nfs_mount_options": { "type": "str", "required": true }
}
},
"rbd": {
"type": "map", "mapping": {
"use_crowbar": { "type": "bool", "required": true },
Expand All @@ -117,6 +124,33 @@
"insecure": { "type" : "bool", "required" : true }
}
},
"hitachi": {
"type": "map", "mapping": {
"storage_protocol": { "type" : "str", "required" : true },
"hitachi_add_chap_user": { "type" : "bool", "required" : true },
"hitachi_async_copy_check_interval": { "type": "int", "required": true },
"hitachi_auth_method": { "type": "str", "required": true },
"hitachi_auth_password": { "type": "str", "required": true },
"hitachi_auth_user": { "type": "str", "required": true },
"hitachi_copy_check_interval": { "type": "int", "required": true },
"hitachi_copy_speed": { "type": "int", "required": true },
"hitachi_default_copy_method": { "type": "str", "required": true },
"hitachi_group_range": { "type": "str", "required": true },
"hitachi_group_request": { "type" : "bool", "required" : true },
"hitachi_horcm_add_conf": { "type" : "bool", "required" : true },
"hitachi_horcm_numbers": { "type": "str", "required": true },
"hitachi_horcm_password": { "type": "str", "required": true },
"hitachi_horcm_resource_lock_timeout": { "type": "int", "required": true },
"hitachi_horcm_user": { "type": "str", "required": true },
"hitachi_ldev_range": { "type": "str", "required": true },
"hitachi_pool_id": { "type": "str", "required": true },
"hitachi_serial_number": { "type": "str", "required": true },
"hitachi_target_ports": { "type": "str", "required": true },
"hitachi_thin_pool_id": { "type": "str", "required": true },
"hitachi_unit_name": { "type": "str", "required": true },
"hitachi_zoning_request": { "type" : "bool", "required" : true }
}
},
"manual": {
"type": "map", "mapping": {
"driver": { "type": "str", "required": true },
Expand Down Expand Up @@ -199,6 +233,12 @@
"iscsi_ip": { "type": "str", "required": true }
}
},
"nfs": {
"type": "map", "mapping": {
"nfs_shares": { "type": "str", "required": true },
"nfs_mount_options": { "type": "str", "required": true }
}
},
"rbd": {
"type": "map", "mapping": {
"use_crowbar": { "type": "bool", "required": true },
Expand All @@ -220,6 +260,33 @@
"insecure": { "type" : "bool", "required" : true }
}
},
"hitachi": {
"type": "map", "mapping": {
"storage_protocol": { "type" : "str", "required" : true },
"hitachi_add_chap_user": { "type" : "bool", "required" : true },
"hitachi_async_copy_check_interval": { "type": "int", "required": true },
"hitachi_auth_method": { "type": "str", "required": true },
"hitachi_auth_password": { "type": "str", "required": true },
"hitachi_auth_user": { "type": "str", "required": true },
"hitachi_copy_check_interval": { "type": "int", "required": true },
"hitachi_copy_speed": { "type": "int", "required": true },
"hitachi_default_copy_method": { "type": "str", "required": true },
"hitachi_group_range": { "type": "str", "required": true },
"hitachi_group_request": { "type" : "bool", "required" : true },
"hitachi_horcm_add_conf": { "type" : "bool", "required" : true },
"hitachi_horcm_numbers": { "type": "str", "required": true },
"hitachi_horcm_password": { "type": "str", "required": true },
"hitachi_horcm_resource_lock_timeout": { "type": "int", "required": true },
"hitachi_horcm_user": { "type": "str", "required": true },
"hitachi_ldev_range": { "type": "str", "required": true },
"hitachi_pool_id": { "type": "str", "required": true },
"hitachi_serial_number": { "type": "str", "required": true },
"hitachi_target_ports": { "type": "str", "required": true },
"hitachi_thin_pool_id": { "type": "str", "required": true },
"hitachi_unit_name": { "type": "str", "required": true },
"hitachi_zoning_request": { "type" : "bool", "required" : true }
}
},
"manual": {
"type": "map", "mapping": {
"driver": { "type": "str", "required": true },
Expand Down
49 changes: 48 additions & 1 deletion chef/data_bags/crowbar/template-neutron.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"verbose": true,
"create_default_networks": true,
"dhcp_domain": "openstack.local",
"rpc_workers": 1,
"use_lbaas": true,
"use_lbaasv2": false,
"lbaasv2_driver": "haproxy",
Expand All @@ -32,6 +33,52 @@
"vni_end": 99999,
"multicast_group": "239.1.1.1"
},
"ovs": {
"tunnel_csum": false
},
"apic": {
"hosts": "",
"system_id": "soc",
"username": "admin",
"password": "",
"opflex": {
"peer_ip": "",
"peer_port": 8009,
"encap": "vxlan",
"vxlan": {
"encap_iface": "br-int_vxlan0",
"uplink_iface": "vlan.4093",
"uplink_vlan": 4093,
"remote_ip": "",
"remote_port": 8472
},
"vlan": {
"encap_iface": ""
}
},
"apic_switches": {
"101": {
"switch_ports": {
"58-00-00-00-00-00" : {
"switch_port": "1/2"
},
"58-00-00-00-00-01" : {
"switch_port": "1/33"
}
}
},
"102": {
"switch_ports": {
"58-00-00-00-00-02" : {
"switch_port": "1/3"
},
"58-00-00-00-00-03" : {
"switch_port": "1/34"
}
}
}
}
},
"allow_overlapping_ips": true,
"use_syslog": false,
"database_instance": "none",
Expand Down Expand Up @@ -116,7 +163,7 @@
"neutron": {
"crowbar-revision": 0,
"crowbar-applied": false,
"schema-revision": 55,
"schema-revision": 57,
"element_states": {
"neutron-server": [ "readying", "ready", "applying" ],
"neutron-network": [ "readying", "ready", "applying" ]
Expand Down
Loading