Use Rados and add Ceph entries to pvcnoded.yaml
This commit is contained in:
		
							
								
								
									
										2
									
								
								debian/control
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								debian/control
									
									
									
									
										vendored
									
									
								
							| @@ -8,7 +8,7 @@ X-Python3-Version: >= 3.2 | |||||||
|  |  | ||||||
| Package: pvc-daemon-node | Package: pvc-daemon-node | ||||||
| Architecture: all | Architecture: all | ||||||
| Depends: systemd, pvc-daemon-common, python3-kazoo, python3-psutil, python3-apscheduler, python3-libvirt, python3-psycopg2, python3-dnspython, python3-yaml, python3-distutils, ipmitool, libvirt-daemon-system, arping, vlan, bridge-utils, dnsmasq, nftables, pdns-server, pdns-backend-pgsql | Depends: systemd, pvc-daemon-common, python3-kazoo, python3-psutil, python3-apscheduler, python3-libvirt, python3-psycopg2, python3-dnspython, python3-yaml, python3-distutils, python3-rados, ipmitool, libvirt-daemon-system, arping, vlan, bridge-utils, dnsmasq, nftables, pdns-server, pdns-backend-pgsql | ||||||
| Suggests: pvc-client-api, pvc-client-cli | Suggests: pvc-client-api, pvc-client-cli | ||||||
| Description: Parallel Virtual Cluster node daemon (Python 3) | Description: Parallel Virtual Cluster node daemon (Python 3) | ||||||
|  A KVM/Zookeeper/Ceph-based VM and private cloud manager |  A KVM/Zookeeper/Ceph-based VM and private cloud manager | ||||||
|   | |||||||
| @@ -179,3 +179,10 @@ pvc: | |||||||
|           mtu: 1500 |           mtu: 1500 | ||||||
|           # address: Storage (Ceph OSD) interface IP address, options: None, by-id, <static>/<mask> |           # address: Storage (Ceph OSD) interface IP address, options: None, by-id, <static>/<mask> | ||||||
|           address: by-id |           address: by-id | ||||||
|  |       # storage; PVC storage configuration | ||||||
|  |       # OPTIONAL if enable_storage: False | ||||||
|  |       storage: | ||||||
|  |         # ceph_config_file: The config file containing the Ceph cluster configuration | ||||||
|  |         ceph_config_file: "/etc/ceph/ceph.conf" | ||||||
|  |         # ceph_admin_keyring: The file containing the Ceph client admin keyring | ||||||
|  |         ceph_admin_keyring: "/etc/ceph/ceph.client.admin.keyring" | ||||||
|   | |||||||
| @@ -43,10 +43,9 @@ import ipaddress | |||||||
| import apscheduler.schedulers.background | import apscheduler.schedulers.background | ||||||
|  |  | ||||||
| from distutils.util import strtobool | from distutils.util import strtobool | ||||||
|  |  | ||||||
| from queue import Queue | from queue import Queue | ||||||
|  |  | ||||||
| from xml.etree import ElementTree | from xml.etree import ElementTree | ||||||
|  | from rados import Rados | ||||||
|  |  | ||||||
| import pvcnoded.log as log | import pvcnoded.log as log | ||||||
| import pvcnoded.zkhandler as zkhandler | import pvcnoded.zkhandler as zkhandler | ||||||
| @@ -263,7 +262,10 @@ def readConfig(pvcnoded_config_file, myhostname): | |||||||
|     # Handle the storage config |     # Handle the storage config | ||||||
|     if config['enable_storage']: |     if config['enable_storage']: | ||||||
|         try: |         try: | ||||||
|             config_storage = dict() |             config_storage = { | ||||||
|  |                 'ceph_config_file': o_config['pvc']['cluster']['storage']['ceph_config_file'], | ||||||
|  |                 'ceph_admin_keyring': o_config['pvc']['cluster']['storage']['ceph_admin_keyring'] | ||||||
|  |             } | ||||||
|         except Exception as e: |         except Exception as e: | ||||||
|             print('ERROR: Failed to load configuration: {}'.format(e)) |             print('ERROR: Failed to load configuration: {}'.format(e)) | ||||||
|             exit(1) |             exit(1) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user