OpenStack RDO Queens: Magnum – Kubernetes Cluster, Getting past VolumeType() Error
I’m putting together a microcloud demo based on RDO OpenStack. I really want to see Kubernetes container orchestration in action! Unfortunately the RDO packstack “all-in-one” distribution of OpenStack is rife with bugs and has few examples on setting up core services like Docker and Kubernetes support. One thing I like about Ansible documentation is that all their module commands have real world examples that work. There is little confusion on how playbooks should be written. The OpenStack docs read like long man files with examples periodically sprinkled in.
Starting with this article I intend to write a series on setting up OpenStack RDO. Along the way I’ll provide explanations, setup examples in Horizon and solutions to common OpenStack problems. Today we are tackling volume creation error upon cluster creation.
/var/log/heat-engine.log:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
2018-03-24 14:51:43.618 3097 ERROR heat.engine.resource raise exception.ResourceFailure(message, self, action=self.action) 2018-03-24 14:51:43.618 3097 ERROR heat.engine.resource ResourceFailure: resources[0]: Property error: resources.docker_volume.properties.volume_type: Error validating value '': The VolumeType () could not be found. 2018-03-24 14:51:43.618 3097 ERROR heat.engine.resource 2018-03-24 14:51:43.722 3097 INFO heat.engine.stack [req-05719e6c-b0fc-4539-a1a7-45050e8fbf7f - admin - default default] Stack CREATE FAILED (test1-4ppvgbgdi3op-kube_masters-vnbxtmll6x5f): Resource CREATE failed: resources[0]: Property error: resources.docker_volume.properties.volume_type: Error validating value '': The VolumeType () could not be found. 2018-03-24 14:51:44.368 3100 INFO heat.engine.resource [req-05719e6c-b0fc-4539-a1a7-45050e8fbf7f - admin - default default] CREATE: ResourceGroup "kube_masters" [0c00655f-97f6-4c13-b867-a54520db358a] Stack "test1-4ppvgbgdi3op" [44f32441-a108-4120-a9ee-dab6769f9bd0] 2018-03-24 14:51:44.368 3100 ERROR heat.engine.resource Traceback (most recent call last): 2018-03-24 14:51:44.368 3100 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 911, in _action_recorder 2018-03-24 14:51:44.368 3100 ERROR heat.engine.resource yield 2018-03-24 14:51:44.368 3100 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 1019, in _do_action 2018-03-24 14:51:44.368 3100 ERROR heat.engine.resource yield self.action_handler_task(action, args=handler_args) 2018-03-24 14:51:44.368 3100 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/scheduler.py", line 346, in wrapper 2018-03-24 14:51:44.368 3100 ERROR heat.engine.resource step = next(subtask) 2018-03-24 14:51:44.368 3100 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 970, in action_handler_task 2018-03-24 14:51:44.368 3100 ERROR heat.engine.resource done = check(handler_data) 2018-03-24 14:51:44.368 3100 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resources/openstack/heat/resource_group.py", line 429, in check_create_complete 2018-03-24 14:51:44.368 3100 ERROR heat.engine.resource return super(ResourceGroup, self).check_create_complete() 2018-03-24 14:51:44.368 3100 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resources/stack_resource.py", line 386, in check_create_complete 2018-03-24 14:51:44.368 3100 ERROR heat.engine.resource return self._check_status_complete(self.CREATE) 2018-03-24 14:51:44.368 3100 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resources/stack_resource.py", line 436, in _check_status_complete 2018-03-24 14:51:44.368 3100 ERROR heat.engine.resource action=action) 2018-03-24 14:51:44.368 3100 ERROR heat.engine.resource ResourceFailure: resources[0]: resources.kube_masters.Property error: resources.docker_volume.properties.volume_type: Error validating value '': The VolumeType () could not be found. 2018-03-24 14:51:44.368 3100 ERROR heat.engine.resource 2018-03-24 14:51:44.420 3100 INFO heat.engine.stack [req-05719e6c-b0fc-4539-a1a7-45050e8fbf7f - admin - default default] Stack CREATE FAILED (test1-4ppvgbgdi3op): Resource CREATE failed: resources[0]: resources.kube_masters.Property error: resources.docker_volume.properties.volume_type: Error validating value '': The VolumeType () could not be found. |
I installed OpenStack RDO – Queens follwoing the instrunctions from their site. Here is the link:
https://www.rdoproject.org/install/packstack/
I want to setup kubernetes clusters; managed from OpenStack. To do this with RDO packstack we must first generate an answer file. This step is absolutely nessasary for the packstack script to know we want Heat and Magnum services installed. Magnum is the cluster managment service for containers. If Heat & Magnum are not specifically enabled in the answer script you will not see the ‘cluster’ & ‘cluster template’ section in Horizon(OpenStack Web UI).
1 2 3 |
[root@mattcom magnum]# packstack --gen-answer-file=queens-answerfile.txt |
Now edit the newly generated, ‘queens-answerfile.txt’.
1 2 3 4 5 6 7 8 |
# entries in the packstack config file CONFIG_MAGNUM_INSTALL=y CONFIG_HEAT_INSTALL=y |
Finish the packstack installation; specifying the answer file we just generated and subsuqently modified to include Heat and Magnum services.
1 2 3 |
[root@mattcom magnum]# packstack --answer-file=queens-answerfile.txt |
The problem it seems is that Magnum(OpenStack cluster managment) needs a certain value to passed between Heat(OpenStack orchestration stack) and Cinder(Openstack volume management).
Add the following to the /etc/magnum/magnum.conf:
1 2 3 4 5 |
[cinder] default_docker_volume_type = iscsi |
Now we need to restart the OpenStack services. The easiest way is to install openstack-utils with yum.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
[root@mattcom magnum]# yum install openstack-utils Loaded plugins: fastestmirror base | 3.6 kB 00:00:00 centos-ceph-jewel | 2.9 kB 00:00:00 centos-qemu-ev | 2.9 kB 00:00:00 epel/x86_64/metalink | 18 kB 00:00:00 epel | 4.7 kB 00:00:00 extras | 3.4 kB 00:00:00 openstack-queens | 2.9 kB 00:00:00 rdo-qemu-ev | 2.9 kB 00:00:00 updates | 3.4 kB 00:00:00 (1/4): extras/7/x86_64/primary_db | 184 kB 00:00:00 (2/4): epel/x86_64/updateinfo | 903 kB 00:00:01 (3/4): updates/7/x86_64/primary_db | 6.9 MB 00:00:03 (4/4): epel/x86_64/primary_db | 6.3 MB 00:00:05 Determining fastest mirrors * base: mirror.linuxfix.com * epel: mirrors.cat.pdx.edu * extras: mirror.sjc02.svwh.net * updates: repo1.sea.innoscale.net Resolving Dependencies --> Running transaction check ---> Package openstack-utils.noarch 0:2017.1-1.el7 will be installed --> Processing Dependency: crudini for package: openstack-utils-2017.1-1.el7.noarch --> Running transaction check ---> Package crudini.noarch 0:0.9-2.el7 will be installed --> Finished Dependency Resolution ===================================================================================================================================================== Package Arch Version Repository Size ===================================================================================================================================================== Installing: openstack-utils noarch 2017.1-1.el7 openstack-queens 18 k Installing for dependencies: crudini noarch 0.9-2.el7 openstack-queens 24 k Transaction Summary ===================================================================================================================================================== Install 1 Package (+1 Dependent package) Total download size: 42 k Installed size: 89 k Is this ok [y/d/N]: |
Select yes, after installation we should be able to easily restart specific services.
1 2 3 4 5 6 7 8 |
[root@mattcom magnum]# openstack-service restart heat [root@mattcom magnum]# [root@mattcom magnum]# openstack-service restart magnum [root@mattcom magnum]# |
Now when you login to OpenStack the ‘cluster’ & ‘cluster templates’ section are enabled and the VolumeError() bug is solved.
On to the next obstacle! The network work creation fails! Stay tuned…
1 Comment »
RSS feed for comments on this post. TrackBack URL
Thanks, I was looking through bug logs for days trying to figure it out. In my case I needed to use = lvm instead of iscsi.