Skip to content

Instantly share code, notes, and snippets.

@zhanghui9700
Created March 1, 2017 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhanghui9700/96fa3f2eeb93adffd01db94a62014690 to your computer and use it in GitHub Desktop.
Save zhanghui9700/96fa3f2eeb93adffd01db94a62014690 to your computer and use it in GitHub Desktop.
Baremetal as a service in openstack

overview

  1. config
  2. code workflow
  3. log
@zhanghui9700
Copy link
Author

LOG

# ironic-conductor.log ironic_fa_deploy.modules.fuel_agent:FuelAgentDeploy:deploy
2017-02-28 03:27:55.026 4059 INFO ironic_fa_deploy.modules.fuel_agent [-] [pykit] Fuel Agent prepare start on node Node(chassis_id=None,clean_step={},conductor_affinity=None,console_enabled=False,created_at=2017-02-27T09:57:55Z,driver='fuel_ipmitool',driver_info={u'ipmi_address': u'172.16.10.2', u'deploy_ramdisk': u'1e6b438c-67e4-4ddd-a6ec-299689d0550b', u'ipmi_password': u'ADMIN', u'ipmi_terminal_port': 623, u'ipmi_username': u'ADMIN', u'deploy_kernel': u'9a0044b2-d1c3-4605-82e3-55c4babe26c5', u'deploy_squashfs': u'674a23e8-f13f-4fe1-a87d-4e1b987cb0fb'},driver_internal_info={u'clean_steps': None, u'is_whole_disk_image': False},extra={},id=124,inspection_finished_at=None,inspection_started_at=None,instance_info={u'memory_mb': u'2048', u'vcpus': u'1', u'root_gb': u'20', u'display_name': u'baremetal-test', u'image_source': u'fd1e5f4b-d648-405f-9255-d6c06c0ef9ba', u'local_gb': u'120', u'swap_mb': u'0'},instance_uuid=e44ea621-8468-4364-af2c-6bdca5be4d85,last_error=None,maintenance=False,maintenance_reason=None,name='instance-1',power_state='power off',properties={u'memory_mb': 125000, u'cpu_arch': u'x86_64', u'local_gb': 120, u'cpus': 40, u'capabilities': u'boot_option:local'},provision_state='deploying',provision_updated_at=2017-02-28T03:27:10Z,raid_config={},reservation='node-5.domain.tld',target_power_state=None,target_provision_state='active',target_raid_config={},updated_at=2017-02-28T03:27:55Z,uuid=37561c05-5e7c-4983-9ed5-714edc94216c)

fule agent workflow inside baremetal(/var/log/fule-agent.log)

2017-03-01 04:48:33.336 1616 DEBUG fuel_agent.cmd.agent [-] Input data: {'profile': '', 'ks_meta': {'image_data': {'/': {'container': 'raw', 'uri': 'http://192.168.3.2:8080/swift/v1/glance/fd1e5f4b-d648-405f-9255-d6c06c0ef9ba?temp_url_sig=3ceb816afd3e55c443e6daf91301eb92d6b64db1&temp_url_expires=1488344591', 'format': 'raw'}}, 'pm_data': {'kernel_params': '', 'ks_spaces': [{'name': 'sda', 'volumes': [{'mount': '/', 'type': 'partition', 'file_system': 'ext2', 'size': 50000}], 'extra': [], 'size': 50000, 'type': 'disk', 'id': 'sda', 'free_space': 120000}]}}}
2017-03-01 04:48:33.336 1616 DEBUG fuel_agent.utils.utils [-] Trying to get driver: fuel_agent.drivers.ironic
2017-03-01 04:48:33.374 1616 DEBUG stevedore.extension [-] found extension EntryPoint.parse('bootstrap_build_image = fuel_agent.drivers.bootstrap:BootstrapBuildImage')
2017-03-01 04:48:33.374 1616 DEBUG stevedore.extension [-] found extension EntryPoint.parse('ironic = fuel_agent.drivers.nailgun:Ironic')
2017-03-01 04:48:33.433 1616 DEBUG stevedore.extension [-] found extension EntryPoint.parse('nailgun = fuel_agent.drivers.nailgun:Nailgun')
2017-03-01 04:48:33.434 1616 DEBUG stevedore.extension [-] found extension EntryPoint.parse('nailgun_build_image = fuel_agent.drivers.nailgun:NailgunBuildImage')
2017-03-01 04:48:33.434 1616 DEBUG stevedore.extension [-] found extension EntryPoint.parse('nailgun_simple = fuel_agent.drivers.simple:NailgunSimpleDriver')
2017-03-01 04:48:33.434 1616 DEBUG fuel_agent.utils.utils [-] Found driver: Ironic
2017-03-01 04:48:33.434 1616 DEBUG fuel_agent.drivers.nailgun [-] --- Preparing image metadata ---
2017-03-01 04:48:33.434 1616 DEBUG fuel_agent.utils.utils [-] Trying to initialize http request object http://192.168.3.2:8080/swift/v1/glance/fd1e5f4b-d648-405f-9255-d6c06c0ef9ba.yaml, byte range: 0
...
017-03-01 04:49:34.415 1616 DEBUG fuel_agent.utils.utils [-] Got non-critical error when accessing to http://192.168.3.2:8080/swift/v1/glance/fd1e5f4b-d648-405f-9255-d6c06c0ef9ba.yaml on 31 attempt: 401 Client Error: Unauthorized for url: http://192.168.3.2:8080/swift/v1/glance/fd1e5f4b-d648-405f-9255-d6c06c0ef9ba.yaml
2017-03-01 04:49:36.417 1616 ERROR fuel_agent.drivers.nailgun [-] Exceeded maximum http request retries for %s
2017-03-01 04:49:36.417 1616 TRACE fuel_agent.drivers.nailgun Traceback (most recent call last):
2017-03-01 04:49:36.417 1616 TRACE fuel_agent.drivers.nailgun   File "/usr/lib/python2.7/dist-packages/fuel_agent/drivers/nailgun.py", line 658, in parse_image_meta
2017-03-01 04:49:36.417 1616 TRACE fuel_agent.drivers.nailgun     utils.init_http_request(metadata_url).text)
2017-03-01 04:49:36.417 1616 TRACE fuel_agent.drivers.nailgun   File "/usr/lib/python2.7/dist-packages/fuel_agent/utils/utils.py", line 266, in init_http_request
2017-03-01 04:49:36.417 1616 TRACE fuel_agent.drivers.nailgun     "Exceeded maximum http request retries for %s".format(url))
2017-03-01 04:49:36.417 1616 TRACE fuel_agent.drivers.nailgun HttpUrlConnectionError: Exceeded maximum http request retries for %s
2017-03-01 04:49:36.417 1616 TRACE fuel_agent.drivers.nailgun 
2017-03-01 04:49:36.423 1616 DEBUG fuel_agent.drivers.nailgun [-] Failed to fetch/decode image meta data
2017-03-01 04:49:36.423 1616 DEBUG fuel_agent.drivers.nailgun [-] --- Preparing operating system data ---
2017-03-01 04:49:36.423 1616 DEBUG fuel_agent.drivers.nailgun [-] --- Getting operating system data by image metadata ---
2017-03-01 04:49:36.423 1616 DEBUG fuel_agent.drivers.nailgun [-] --- Getting operating system data by profile ---
2017-03-01 04:49:36.423 1616 WARNING fuel_agent.drivers.nailgun [-] This environment does not support non-root accounts on the target nodes. Non-root user accounts will not be created
2017-03-01 04:49:36.424 1616 DEBUG fuel_agent.drivers.nailgun [-] --- Parse grub settings ---
2017-03-01 04:49:36.424 1616 DEBUG fuel_agent.drivers.nailgun [-] Appending kernel parameters: 
2017-03-01 04:49:36.424 1616 DEBUG fuel_agent.drivers.nailgun [-] Grub version is 2
2017-03-01 04:49:36.424 1616 DEBUG fuel_agent.drivers.nailgun [-] --- Preparing partition scheme ---
2017-03-01 04:49:36.430 1616 DEBUG fuel_agent.drivers.nailgun [-] Looping over all disks in provision data
2017-03-01 04:49:36.430 1616 DEBUG fuel_agent.drivers.nailgun [-] Processing disk sda
2017-03-01 04:49:36.431 1616 DEBUG fuel_agent.drivers.nailgun [-] Adding gpt table on disk sda
2017-03-01 04:49:36.431 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm info --export-db
2017-03-01 04:49:36.496 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm info --query=property --export --name=/dev/nvme0n1
2017-03-01 04:49:36.500 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: blockdev --getsz --getro --getss --getpbsz --getsize64 --getiomin --getioopt --getra --getalignoff --getmaxsect /dev/nvme0n1
2017-03-01 04:49:36.507 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm info --query=property --export --name=/dev/nvme0n1p1
2017-03-01 04:49:36.511 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: blockdev --getsz --getro --getss --getpbsz --getsize64 --getiomin --getioopt --getra --getalignoff --getmaxsect /dev/nvme0n1p1
2017-03-01 04:49:36.513 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm info --query=property --export --name=/dev/nvme0n1p2
2017-03-01 04:49:36.517 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: blockdev --getsz --getro --getss --getpbsz --getsize64 --getiomin --getioopt --getra --getalignoff --getmaxsect /dev/nvme0n1p2
2017-03-01 04:49:36.520 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm info --query=property --export --name=/dev/nvme0n1p3
2017-03-01 04:49:36.524 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: blockdev --getsz --getro --getss --getpbsz --getsize64 --getiomin --getioopt --getra --getalignoff --getmaxsect /dev/nvme0n1p3
2017-03-01 04:49:36.527 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm info --query=property --export --name=/dev/nvme0n1p4
2017-03-01 04:49:36.530 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: blockdev --getsz --getro --getss --getpbsz --getsize64 --getiomin --getioopt --getra --getalignoff --getmaxsect /dev/nvme0n1p4
2017-03-01 04:49:36.533 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm info --query=property --export --name=/dev/sda
2017-03-01 04:49:36.537 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: blockdev --getsz --getro --getss --getpbsz --getsize64 --getiomin --getioopt --getra --getalignoff --getmaxsect /dev/sda
2017-03-01 04:49:36.540 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm info --query=property --export --name=/dev/sda1
2017-03-01 04:49:36.543 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: blockdev --getsz --getro --getss --getpbsz --getsize64 --getiomin --getioopt --getra --getalignoff --getmaxsect /dev/sda1
2017-03-01 04:49:36.546 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm info --query=property --export --name=/dev/sda2
2017-03-01 04:49:36.550 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: blockdev --getsz --getro --getss --getpbsz --getsize64 --getiomin --getioopt --getra --getalignoff --getmaxsect /dev/sda2
2017-03-01 04:49:36.553 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm info --query=property --export --name=/dev/sda3
2017-03-01 04:49:36.556 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: blockdev --getsz --getro --getss --getpbsz --getsize64 --getiomin --getioopt --getra --getalignoff --getmaxsect /dev/sda3
2017-03-01 04:49:36.559 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm info --query=property --export --name=/dev/sdb
2017-03-01 04:49:36.563 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: blockdev --getsz --getro --getss --getpbsz --getsize64 --getiomin --getioopt --getra --getalignoff --getmaxsect /dev/sdb
2017-03-01 04:49:36.566 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm info --query=property --export --name=/dev/sdb1
2017-03-01 04:49:36.569 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: blockdev --getsz --getro --getss --getpbsz --getsize64 --getiomin --getioopt --getra --getalignoff --getmaxsect /dev/sdb1
2017-03-01 04:49:36.572 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm info --query=property --export --name=/dev/sdb2
2017-03-01 04:49:36.575 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: blockdev --getsz --getro --getss --getpbsz --getsize64 --getiomin --getioopt --getra --getalignoff --getmaxsect /dev/sdb2
2017-03-01 04:49:36.578 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm info --query=property --export --name=/dev/sdb3
2017-03-01 04:49:36.581 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: blockdev --getsz --getro --getss --getpbsz --getsize64 --getiomin --getioopt --getra --getalignoff --getmaxsect /dev/sdb3
...
2017-03-01 04:49:36.639 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm info --query=property --export --name=/dev/sdj
2017-03-01 04:49:36.643 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: blockdev --getsz --getro --getss --getpbsz --getsize64 --getiomin --getioopt --getra --getalignoff --getmaxsect /dev/sdj
2017-03-01 04:49:36.646 1616 DEBUG fuel_agent.drivers.nailgun [-] Adding bootloader stage0 on disk sda
2017-03-01 04:49:36.646 1616 DEBUG fuel_agent.drivers.nailgun [-] Adding bios_grub partition on disk sda: size=24
2017-03-01 04:49:36.646 1616 DEBUG fuel_agent.drivers.nailgun [-] Adding UEFI partition on disk sda: size=200
2017-03-01 04:49:36.646 1616 DEBUG fuel_agent.drivers.nailgun [-] Looping over all volumes on disk sda
2017-03-01 04:49:36.646 1616 DEBUG fuel_agent.drivers.nailgun [-] Processing volume: name=None type=partition size=50000 mount=/ vg=None
2017-03-01 04:49:36.647 1616 DEBUG fuel_agent.drivers.nailgun [-] Adding partition on disk sda: size=50000
2017-03-01 04:49:36.647 1616 DEBUG fuel_agent.drivers.nailgun [-] Partition name: /dev/sda3
2017-03-01 04:49:36.647 1616 DEBUG fuel_agent.drivers.nailgun [-] Adding file system on partition: mount=/ type=ext2
2017-03-01 04:49:36.647 1616 DEBUG fuel_agent.drivers.nailgun [-] Looping over all volume groups in provision data
2017-03-01 04:49:36.647 1616 DEBUG fuel_agent.objects.partition.scheme [-] Elevate keep_data flag from partitions
2017-03-01 04:49:36.647 1616 DEBUG fuel_agent.drivers.nailgun [-] --- Preparing image scheme ---
2017-03-01 04:49:36.648 1616 DEBUG fuel_agent.drivers.nailgun [-] Looping over all images in provision data
2017-03-01 04:49:36.648 1616 DEBUG fuel_agent.drivers.nailgun [-] Adding image for fs /: uri=http://192.168.3.2:8080/swift/v1/glance/fd1e5f4b-d648-405f-9255-d6c06c0ef9ba?temp_url_sig=3ceb816afd3e55c443e6daf91301eb92d6b64db1&temp_url_expires=1488344591 format=raw container=raw
2017-03-01 04:49:36.648 1616 DEBUG fuel_agent.manager [-] --- Provisioning (do_provisioning) ---
2017-03-01 04:49:36.648 1616 DEBUG fuel_agent.manager [-] --- Partitioning disks (do_partitioning) ---
2017-03-01 04:49:36.648 1616 DEBUG fuel_agent.utils.md [-] Trying to wipe out all md devices
2017-03-01 04:49:36.648 1616 DEBUG fuel_agent.utils.md [-] Found md devices: []
2017-03-01 04:49:36.648 1616 DEBUG fuel_agent.utils.md [-] Found md devices: []
2017-03-01 04:49:36.648 1616 DEBUG fuel_agent.utils.md [-] Found md devices: []
2017-03-01 04:49:36.649 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: lvdisplay -C --noheading --units m --options lv_name,lv_size,vg_name,lv_uuid --separator ;
2017-03-01 04:49:37.581 1616 DEBUG fuel_agent.utils.lvm [-] Found logical volumes: []
2017-03-01 04:49:37.581 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: vgdisplay -C --noheading --units m --options vg_name,vg_uuid,vg_size,vg_free --separator ;
2017-03-01 04:49:38.095 1616 DEBUG fuel_agent.utils.lvm [-] Found volume groups: []
2017-03-01 04:49:38.095 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: pvdisplay -C --noheading --units m --options pv_name,vg_name,pv_size,dev_size,pv_uuid --separator ;
2017-03-01 04:49:38.560 1616 DEBUG fuel_agent.utils.lvm [-] Found physical volumes: []
2017-03-01 04:49:38.560 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: dd if=/dev/zero bs=1M seek=0 count=5 of=/dev/sda
2017-03-01 04:49:38.569 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: dd if=/dev/zero bs=1M seek=22 count=5 of=/dev/sda
2017-03-01 04:49:38.577 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: dd if=/dev/zero bs=1M seek=23 count=5 of=/dev/sda
2017-03-01 04:49:38.582 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: dd if=/dev/zero bs=1M seek=223 count=5 of=/dev/sda
2017-03-01 04:49:38.591 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: dd if=/dev/zero bs=1M seek=224 count=5 of=/dev/sda
2017-03-01 04:49:38.599 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: dd if=/dev/zero bs=1M seek=50224 count=5 of=/dev/sda
2017-03-01 04:49:38.606 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm info --query=property --export --name=/dev/sda
2017-03-01 04:49:38.610 1616 DEBUG fuel_agent.utils.utils [-] Enabling udev's rules blacklisting
2017-03-01 04:49:38.610 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm settle
...
2017-03-01 04:49:38.723 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm settle
2017-03-01 04:49:38.726 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm control --reload-rules
2017-03-01 04:49:38.730 1616 DEBUG fuel_agent.utils.partition [-] Trying to create gpt partition table on device /dev/sda
2017-03-01 04:49:38.730 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm settle
2017-03-01 04:49:38.733 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: parted -s /dev/sda mklabel gpt
2017-03-01 04:49:38.779 1616 DEBUG fuel_agent.utils.partition [-] Parted output: 

2017-03-01 04:49:38.779 1616 DEBUG fuel_agent.utils.partition [-] Trying to create a partition: dev=/dev/sda begin=1 end=25
2017-03-01 04:49:38.780 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm settle
2017-03-01 04:49:38.783 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: parted -s /dev/sda -m unit MiB print free
2017-03-01 04:49:38.787 1616 DEBUG fuel_agent.utils.partition [-] Info output: 
BYT;
/dev/sda:113952MiB:scsi:512:512:gpt:AVAGO MR9361-8i;
1:0.02MiB:113952MiB:113952MiB:free;

2017-03-01 04:49:38.787 1616 DEBUG fuel_agent.utils.partition [-] Info result: {'generic': {'dev': '/dev/sda', 'physical_block': 512, 'table': 'gpt', 'logical_block': 512, 'model': 'AVAGO MR9361-8i', 'size': 113952}, 'parts': [{'begin': 1, 'num': 1, 'end': 113952, 'fstype': 'free', 'size': 113952}]}
2017-03-01 04:49:38.787 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm settle
2017-03-01 04:49:38.790 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: parted -a optimal -s /dev/sda unit MiB mkpart primary 1 25
2017-03-01 04:49:38.799 1616 DEBUG fuel_agent.utils.partition [-] Parted output: 

2017-03-01 04:49:38.799 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm trigger --subsystem-match=block
2017-03-01 04:49:38.803 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm settle
...
2017-03-01 04:49:39.740 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm settle
2017-03-01 04:49:39.844 1616 DEBUG fuel_agent.utils.partition [-] Trying to set partition flag: dev=/dev/sda num=1 flag=bios_grub state=on
2017-03-01 04:49:39.844 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm settle
2017-03-01 04:49:39.848 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: parted -s /dev/sda set 1 bios_grub on
2017-03-01 04:49:39.858 1616 DEBUG fuel_agent.utils.partition [-] Parted output: 

2017-03-01 04:49:39.858 1616 DEBUG fuel_agent.utils.partition [-] Trying to create a partition: dev=/dev/sda begin=26 end=226
2017-03-01 04:49:39.858 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm settle
2017-03-01 04:49:39.862 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: parted -s /dev/sda -m unit MiB print free
2017-03-01 04:49:39.867 1616 DEBUG fuel_agent.utils.partition [-] Info output: 
BYT;
/dev/sda:113952MiB:scsi:512:512:gpt:AVAGO MR9361-8i;
1:0.02MiB:0.25MiB:0.23MiB:free;
1:0.25MiB:25.0MiB:24.8MiB::primary:bios_grub;
1:25.0MiB:113952MiB:113927MiB:free;

2017-03-01 04:49:39.867 1616 DEBUG fuel_agent.utils.partition [-] Info result: {'generic': {'dev': '/dev/sda', 'physical_block': 512, 'table': 'gpt', 'logical_block': 512, 'model': 'AVAGO MR9361-8i', 'size': 113952}, 'parts': [{'begin': 1, 'num': 1, 'end': 1, 'fstype': 'free', 'size': 1}, {'begin': 1, 'num': 1, 'end': 25, 'fstype': None, 'size': 25}, {'begin': 25, 'num': 1, 'end': 113952, 'fstype': 'free', 'size': 113927}]}
2017-03-01 04:49:39.868 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm settle
2017-03-01 04:49:39.871 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: parted -a optimal -s /dev/sda unit MiB mkpart primary 26 226
2017-03-01 04:49:39.882 1616 DEBUG fuel_agent.utils.partition [-] Parted output: 

2017-03-01 04:49:39.882 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm trigger --subsystem-match=block
2017-03-01 04:49:39.888 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm settle
...
2017-03-01 04:49:40.827 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm settle
2017-03-01 04:49:40.931 1616 DEBUG fuel_agent.utils.partition [-] Trying to create a partition: dev=/dev/sda begin=227 end=50227
2017-03-01 04:49:40.932 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm settle
2017-03-01 04:49:40.935 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: parted -s /dev/sda -m unit MiB print free
2017-03-01 04:49:40.942 1616 DEBUG fuel_agent.utils.partition [-] Info output: 
BYT;
/dev/sda:113952MiB:scsi:512:512:gpt:AVAGO MR9361-8i;
1:0.02MiB:0.25MiB:0.23MiB:free;
1:0.25MiB:25.0MiB:24.8MiB::primary:bios_grub;
1:25.0MiB:26.0MiB:1.00MiB:free;
2:26.0MiB:226MiB:200MiB::primary:;
1:226MiB:113952MiB:113726MiB:free;

2017-03-01 04:49:40.942 1616 DEBUG fuel_agent.utils.partition [-] Info result: {'generic': {'dev': '/dev/sda', 'physical_block': 512, 'table': 'gpt', 'logical_block': 512, 'model': 'AVAGO MR9361-8i', 'size': 113952}, 'parts': [{'begin': 1, 'num': 1, 'end': 1, 'fstype': 'free', 'size': 1}, {'begin': 1, 'num': 1, 'end': 25, 'fstype': None, 'size': 25}, {'begin': 25, 'num': 1, 'end': 26, 'fstype': 'free', 'size': 1}, {'begin': 26, 'num': 2, 'end': 226, 'fstype': None, 'size': 200}, {'begin': 226, 'num': 1, 'end': 113952, 'fstype': 'free', 'size': 113726}]}
2017-03-01 04:49:40.942 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm settle
2017-03-01 04:49:40.946 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: parted -a optimal -s /dev/sda unit MiB mkpart primary 227 50227
2017-03-01 04:49:40.957 1616 DEBUG fuel_agent.utils.partition [-] Parted output: 

2017-03-01 04:49:40.957 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm trigger --subsystem-match=block
2017-03-01 04:49:40.962 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm settle
...
2017-03-01 04:49:41.900 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm settle
2017-03-01 04:49:42.004 1616 DEBUG fuel_agent.utils.utils [-] Disabling udev's rules blacklisting
2017-03-01 04:49:42.005 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm settle
...
2017-03-01 04:49:42.121 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm settle
2017-03-01 04:49:42.124 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm control --reload-rules
2017-03-01 04:49:42.127 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm trigger --subsystem-match=block
2017-03-01 04:49:42.131 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm settle
2017-03-01 04:49:42.507 1616 DEBUG fuel_agent.utils.md [-] Trying to wipe out all md devices
2017-03-01 04:49:42.507 1616 DEBUG fuel_agent.utils.md [-] Found md devices: []
2017-03-01 04:49:42.507 1616 DEBUG fuel_agent.utils.md [-] Found md devices: []
2017-03-01 04:49:42.507 1616 DEBUG fuel_agent.utils.md [-] Found md devices: []
2017-03-01 04:49:42.507 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: lvdisplay -C --noheading --units m --options lv_name,lv_size,vg_name,lv_uuid --separator ;
2017-03-01 04:49:42.528 1616 DEBUG fuel_agent.utils.lvm [-] Found logical volumes: []
2017-03-01 04:49:42.528 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: vgdisplay -C --noheading --units m --options vg_name,vg_uuid,vg_size,vg_free --separator ;
2017-03-01 04:49:42.547 1616 DEBUG fuel_agent.utils.lvm [-] Found volume groups: []
2017-03-01 04:49:42.548 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: pvdisplay -C --noheading --units m --options pv_name,vg_name,pv_size,dev_size,pv_uuid --separator ;
2017-03-01 04:49:42.566 1616 DEBUG fuel_agent.utils.lvm [-] Found physical volumes: []
2017-03-01 04:49:42.566 1616 DEBUG fuel_agent.manager [-] --- Creating configdrive (do_configdrive) ---
2017-03-01 04:49:42.566 1616 DEBUG fuel_agent.manager [-] --- Copying images (do_copyimage) ---
2017-03-01 04:49:42.566 1616 DEBUG fuel_agent.manager [-] Processing image: http://192.168.3.2:8080/swift/v1/glance/fd1e5f4b-d648-405f-9255-d6c06c0ef9ba?temp_url_sig=3ceb816afd3e55c443e6daf91301eb92d6b64db1&temp_url_expires=1488344591
2017-03-01 04:49:42.567 1616 DEBUG fuel_agent.manager [-] Appending uri processor: http://192.168.3.2:8080/swift/v1/glance/fd1e5f4b-d648-405f-9255-d6c06c0ef9ba?temp_url_sig=3ceb816afd3e55c443e6daf91301eb92d6b64db1&temp_url_expires=1488344591
2017-03-01 04:49:42.567 1616 DEBUG fuel_agent.manager [-] Appending HTTP processor
2017-03-01 04:49:42.567 1616 DEBUG fuel_agent.manager [-] Appending TARGET processor: /dev/sda3
2017-03-01 04:49:42.567 1616 DEBUG fuel_agent.manager [-] Launching image processing chain
2017-03-01 04:49:42.567 1616 DEBUG fuel_agent.utils.utils [-] Trying to initialize http request object http://192.168.3.2:8080/swift/v1/glance/fd1e5f4b-d648-405f-9255-d6c06c0ef9ba?temp_url_sig=3ceb816afd3e55c443e6daf91301eb92d6b64db1&temp_url_expires=1488344591, byte range: 0
2017-03-01 04:49:42.592 1616 DEBUG fuel_agent.utils.utils [-] Successful http request to http://192.168.3.2:8080/swift/v1/glance/fd1e5f4b-d648-405f-9255-d6c06c0ef9ba?temp_url_sig=3ceb816afd3e55c443e6daf91301eb92d6b64db1&temp_url_expires=1488344591 on 1 retry
2017-03-01 04:49:42.592 1616 DEBUG fuel_agent.utils.artifact [-] Expected content length 332398592 for http://192.168.3.2:8080/swift/v1/glance/fd1e5f4b-d648-405f-9255-d6c06c0ef9ba?temp_url_sig=3ceb816afd3e55c443e6daf91301eb92d6b64db1&temp_url_expires=1488344591
2017-03-01 04:49:42.592 1616 DEBUG fuel_agent.utils.artifact [-] Processor target: /dev/sda3
2017-03-01 04:49:42.592 1616 DEBUG fuel_agent.utils.artifact [-] Opening file: /dev/sda3 for write
2017-03-01 04:49:42.607 1616 DEBUG fuel_agent.utils.artifact [-] Next chunk: 0
2017-03-01 04:49:42.620 1616 DEBUG fuel_agent.utils.artifact [-] Next chunk: 1
2017-03-01 04:49:42.629 1616 DEBUG fuel_agent.utils.artifact [-] Next chunk: 2
...
2017-03-01 04:49:45.632 1616 DEBUG fuel_agent.utils.artifact [-] Next chunk: 314
2017-03-01 04:49:45.640 1616 DEBUG fuel_agent.utils.artifact [-] Next chunk: 315
2017-03-01 04:49:45.650 1616 DEBUG fuel_agent.utils.artifact [-] Next chunk: 316
2017-03-01 04:49:45.650 1616 DEBUG fuel_agent.utils.artifact [-] Flushing file: /dev/sda3
2017-03-01 04:49:45.750 1616 DEBUG fuel_agent.utils.artifact [-] File is written: /dev/sda3
2017-03-01 04:49:45.751 1616 DEBUG fuel_agent.manager [-] Skipping image checksum comparing. Ether size or hash have been missed
2017-03-01 04:49:45.751 1616 DEBUG fuel_agent.manager [-] Extending image file systems
2017-03-01 04:49:45.751 1616 DEBUG fuel_agent.manager [-] Mounting target file systems into a flat set of temporary directories
2017-03-01 04:49:45.752 1616 DEBUG fuel_agent.utils.utils [-] Trying to execute command: mount -t ext2 /dev/sda3 /tmp/tmppV4TMn
2017-03-01 04:49:45.756 1616 WARNING fuel_agent.utils.utils [-] Failed to execute command: Unexpected error while running command.
Command: mount -t ext2 /dev/sda3 /tmp/tmppV4TMn
Exit code: 32
Stdout: ''
Stderr: 'mount: wrong fs type, bad option, bad superblock on /dev/sda3,\n       missing codepage or helper program, or other error\n       In some cases useful info is found in syslog - try\n       dmesg | tail  or so\n\n'
2017-03-01 04:49:45.756 1616 ERROR fuel_agent.cmd.agent [-] Unexpected error while running command.
Command: mount -t ext2 /dev/sda3 /tmp/tmppV4TMn
Exit code: 32
Stdout: ''
Stderr: 'mount: wrong fs type, bad option, bad superblock on /dev/sda3,\n       missing codepage or helper program, or other error\n       In some cases useful info is found in syslog - try\n       dmesg | tail  or so\n\n'
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent Traceback (most recent call last):
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent   File "/usr/lib/python2.7/dist-packages/fuel_agent/cmd/agent.py", line 121, in main
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent     getattr(mgr, action)()
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent   File "/usr/lib/python2.7/dist-packages/fuel_agent/manager.py", line 979, in do_provisioning
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent     self.do_copyimage()
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent   File "/usr/lib/python2.7/dist-packages/fuel_agent/manager.py", line 485, in do_copyimage
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent     self.move_files_to_their_places()
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent   File "/usr/lib/python2.7/dist-packages/fuel_agent/manager.py", line 507, in move_files_to_their_places
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent     mount_map = self.mount_target_flat()
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent   File "/usr/lib/python2.7/dist-packages/fuel_agent/manager.py", line 551, in mount_target_flat
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent     mount_map[fs_mount] = fu.mount_fs_temp(fs.type, str(fs.device))
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent   File "/usr/lib/python2.7/dist-packages/fuel_agent/utils/fs.py", line 127, in mount_fs_temp
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent     mount_fs(fs_type, fs_dev, mount_point)
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent   File "/usr/lib/python2.7/dist-packages/fuel_agent/utils/fs.py", line 96, in mount_fs
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent     utils.execute(*cmd, check_exit_code=[0])
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent   File "/usr/lib/python2.7/dist-packages/fuel_agent/utils/utils.py", line 141, in execute
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent     stderr=stderr, cmd=command)
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent ProcessExecutionError: Unexpected error while running command.
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent Command: mount -t ext2 /dev/sda3 /tmp/tmppV4TMn
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent Exit code: 32
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent Stdout: ''
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent Stderr: 'mount: wrong fs type, bad option, bad superblock on /dev/sda3,\n       missing codepage or helper program, or other error\n       In some cases useful info is found in syslog - try\n       dmesg | tail  or so\n\n'
2017-03-01 04:49:45.756 1616 TRACE fuel_agent.cmd.agent 

if provisoning is suceesss, the log like this:

2017-03-01 07:48:08.897 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: mount -t ext4 /dev/sda3 /tmp/tmpXFGEQ7
2017-03-01 07:48:08.902 1636 DEBUG fuel_agent.manager [-] Flat mount map: {'/': '/tmp/tmpXFGEQ7'}
2017-03-01 07:48:08.902 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: mountpoint -q /tmp/tmpXFGEQ7
2017-03-01 07:48:08.908 1636 DEBUG fuel_agent.utils.fs [-] Trying to umount /tmp/tmpXFGEQ7
2017-03-01 07:48:08.909 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: umount /tmp/tmpXFGEQ7
2017-03-01 07:48:08.932 1636 DEBUG fuel_agent.manager [-] --- Installing bootloader (do_bootloader) ---
2017-03-01 07:48:08.932 1636 DEBUG fuel_agent.manager [-] Mounting target file systems: /tmp/target
2017-03-01 07:48:08.932 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: mount -t ext4 /dev/sda3 /tmp/target/
2017-03-01 07:48:08.937 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: mount --bind /sys /tmp/target/sys
2017-03-01 07:48:08.940 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: mount --bind /dev /tmp/target/dev
2017-03-01 07:48:08.943 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: mount --bind /proc /tmp/target/proc
2017-03-01 07:48:08.946 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: chroot /tmp/target grep -v rootfs /proc/mounts
2017-03-01 07:48:08.966 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: blkid -c /dev/null -o value -s UUID /dev/sda3
2017-03-01 07:48:08.975 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: udevadm info --query=property --export --name=/dev/sda
2017-03-01 07:48:08.979 1636 DEBUG fuel_agent.utils.grub [-] Looking for grub-install: trying /sbin/grub-install
2017-03-01 07:48:08.979 1636 DEBUG fuel_agent.utils.grub [-] Looking for grub-install: trying /sbin/grub2-install
2017-03-01 07:48:08.979 1636 DEBUG fuel_agent.utils.grub [-] Looking for grub-install: trying /usr/sbin/grub-install
2017-03-01 07:48:08.980 1636 DEBUG fuel_agent.utils.grub [-] grub-install found: /usr/sbin/grub-install
2017-03-01 07:48:08.980 1636 DEBUG fuel_agent.utils.grub [-] Trying to run /usr/sbin/grub-install --version
2017-03-01 07:48:08.980 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: chroot /tmp/target /usr/sbin/grub-install --version
2017-03-01 07:48:08.994 1636 DEBUG fuel_agent.utils.grub [-] Looks like grub version is 2
2017-03-01 07:48:08.996 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: chroot /tmp/target /usr/sbin/grub-mkconfig -o /boot/grub/grub.cfg
2017-03-01 07:48:09.519 1636 DEBUG fuel_agent.utils.grub [-] Looking for grub-install: trying /sbin/grub-install
2017-03-01 07:48:09.519 1636 DEBUG fuel_agent.utils.grub [-] Looking for grub-install: trying /sbin/grub2-install
2017-03-01 07:48:09.519 1636 DEBUG fuel_agent.utils.grub [-] Looking for grub-install: trying /usr/sbin/grub-install
2017-03-01 07:48:09.519 1636 DEBUG fuel_agent.utils.grub [-] grub-install found: /usr/sbin/grub-install
2017-03-01 07:48:09.519 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: chroot /tmp/target /usr/sbin/grub-install /dev/sda
2017-03-01 07:48:09.702 1636 DEBUG fuel_agent.manager [-] Preventing nailgun-agent from doing anything until it is unlocked
2017-03-01 07:48:09.703 1636 DEBUG fuel_agent.manager [-] Umounting target file systems: /tmp/target
2017-03-01 07:48:09.703 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: mountpoint -q /tmp/target/proc
2017-03-01 07:48:09.706 1636 DEBUG fuel_agent.utils.fs [-] Trying to umount /tmp/target/proc
2017-03-01 07:48:09.706 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: umount /tmp/target/proc
2017-03-01 07:48:09.723 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: mountpoint -q /tmp/target/dev
2017-03-01 07:48:09.726 1636 DEBUG fuel_agent.utils.fs [-] Trying to umount /tmp/target/dev
2017-03-01 07:48:09.726 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: umount /tmp/target/dev
2017-03-01 07:48:09.743 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: mountpoint -q /tmp/target/sys/fs/fuse/connections
2017-03-01 07:48:09.746 1636 WARNING fuel_agent.utils.utils [-] Failed to execute command: Unexpected error while running command.
Command: mountpoint -q /tmp/target/sys/fs/fuse/connections
Exit code: 1
Stdout: ''
Stderr: ''
2017-03-01 07:48:09.746 1636 WARNING fuel_agent.utils.fs [-] /tmp/target/sys/fs/fuse/connections is not a mountpoint, skipping umount
2017-03-01 07:48:09.746 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: mountpoint -q /tmp/target/sys
2017-03-01 07:48:09.748 1636 DEBUG fuel_agent.utils.fs [-] Trying to umount /tmp/target/sys
2017-03-01 07:48:09.748 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: umount /tmp/target/sys
2017-03-01 07:48:09.763 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: mountpoint -q /tmp/target/
2017-03-01 07:48:09.765 1636 DEBUG fuel_agent.utils.fs [-] Trying to umount /tmp/target/
2017-03-01 07:48:09.765 1636 DEBUG fuel_agent.utils.utils [-] Trying to execute command: umount /tmp/target/
2017-03-01 07:48:09.794 1636 DEBUG fuel_agent.manager [-] --- Provisioning END (do_provisioning) ---

@zhanghui9700
Copy link
Author

openstack baremetal as a service Ironic

node-1,node-3 controller+nova-compute(ironic)
node-2,node-4 nova-compute(kvm)
node-5 ironic-conductor

overview

ironic-workflow

make sure nova-scheduler can scheduler barematel request to ironic-compute

  1. /etc/nova/nova.conf | grep "scheduler_default_filters" | grep ComputeCapabilitiesFilter
  2. flavor extra_spces capabilities=boot_option:local
  3. node-update add properties/cpu_arch=x86_64 properties/capabilities=boot_option:local

node-3 /etc/nova/nova.con
scheduler_host_manager=nova.scheduler.ironic_host_manager.IronicHostManager

enroll baremetal

ironic node-create \
  -d fuel_ipmitool \
  -i ipmi_address="${IPMI_ADDRESS}" \
  -i ipmi_username=ADMIN \
  -i ipmi_password=ADMIN \
  -i deploy_ramdisk="${INITRAMFS_IMAGE}" \
  -i deploy_kernel="${KERNEL_IMAGE}" \
  -i deploy_squashfs="${KERNEL_SQUASHFS}" \
  -n baremetal-test
 
ironic node-update <baremetal-test-UUID> add \
    driver_info/ipmi_terminal_port=623

ironic port-create \
  -n <baremetal-test-UUID> \
  -a ${NODE_MACADDRESS}

ironic node-update <baremetal-test-UUID> add \
    properties/cpus=40 \
    properties/memory_mb=125000 \
    properties/local_gb=120 \
    properties/capabilities=boot_option:local

ironic node-validate <baremetal-test-UUID>

check

root@node-3:/# ironic node-validate 37561c05-5e7c-4983-9ed5-714edc94216c

+------------+--------+---------------+
| Interface  | Result | Reason        |
+------------+--------+---------------+
| boot       | None   | not supported |
| console    | True   |               |
| deploy     | True   |               |
| inspect    | None   | not supported |
| management | True   |               |
| power      | True   |               |
| raid       | None   | not supported |
+------------+--------+---------------+

launch instance

root@node-5:~# ll /usr/lib/python2.7/dist-packages/ironic

ironic/                          ironicclient/                    ironic_fa_deploy-9.0.0.egg-info/ ironic_lib-1.1.0.egg-info/       
ironic-5.1.0.egg-info/           ironic_fa_deploy/                ironic_lib/                      ironic_tempest_plugin/ 

root@node-5:~# cat /etc/ironic/ironic.conf

[DEFAULT]
auth_strategy=keystone
enabled_drivers = pxe_ipmitool,fuel_ipmitool
verbose=True
log_dir=/var/log/ironic
rpc_backend=rabbit
control_exchange=ironic

root@node-5:~# cat /etc/ironic/ironic.conf | grep -v "^#\|^$" | grep -A 10 "\[glance\]"

[glance]
swift_temp_url_key=pPQHG3LNFyP0aMZa2OrwuyVx
swift_endpoint_url=http://192.168.3.2:8080
temp_url_endpoint_type=radosgw
glance_api_servers=172.16.11.2:9292
glance_api_insecure=False
glance_num_retries=0

root@bootstrap-ironic:~# cat /etc/fuel-agent/fuel-agent.conf(inside the baremetal)

[DEFAULT]
use_stderr=false
logging_debug_format_suffix=
log_file=/var/log/fuel-agent.log
use_syslog=true
use_syslog_rfc_format=true
prepare_configdrive=false
**fix_udev_net_rules**=false

root@node-5:~# cat /var/log/ironic/ironic-conductor.log | grep "Loaded the following drivers"

2017-02-28 02:14:08.741 16176 INFO ironic.common.driver_factory [req-caccb840-80a1-4c9c-bf0a-1621ce5fc14b - - - - -] Loaded the following drivers: ['fake', 'fuel_ipmitool', 'fuel_ssh', 'fuel_libvirt']

root@node-5:/usr/lib/python2.7/dist-packages# cat ironic_fa_deploy-9.0.0.egg-info/entry_points.txt

[ironic.drivers]
fuel_ipmitool = ironic_fa_deploy.fuel:FuelAndIPMIToolDriver
fuel_libvirt = ironic_fa_deploy.fuel:FuelAndLibvirtDriver
fuel_ssh = ironic_fa_deploy.fuel:FuelAndSSHDriver

ironic_fa_deploy属于fule-agent项目

class FuelAndIPMIToolDriver(base.BaseDriver):
    """Fuel + IPMITool driver.

    This driver implements the `core` functionality, combining
    :class:`ironic.drivers.modules.ipmitool.IPMIPower` (for power on/off and
    reboot) with :class:`ironic.drivers.modules.fuel_agent.FuelAgentDeploy`
    (for image deployment).
    Implementations are in those respective classes; this class is merely the
    glue between them.
    """

    def __init__(self):
        self.power = ipmitool.IPMIPower()
        self.deploy = fuel_agent.FuelAgentDeploy()
        self.management = ipmitool.IPMIManagement()
        self.console = ipmitool.IPMIShellinaboxConsole()
        self.vendor = fuel_agent.FuelAgentVendor()

root@node-3:~# ironic node-list

+--------------------------------------+------------+---------------+-------------+--------------------+-------------+
| UUID                                 | Name       | Instance UUID | Power State | Provisioning State | Maintenance |
+--------------------------------------+------------+---------------+-------------+--------------------+-------------+
| 37561c05-5e7c-4983-9ed5-714edc94216c | instance-1 | None          | power off   | available          | False       |
+--------------------------------------+------------+---------------+-------------+--------------------+-------------+

root@node-3:~# ironic node-show instance-1

+------------------------+---------------------------------------------------------------------+
| Property               | Value                                                               |
+------------------------+---------------------------------------------------------------------+
| chassis_uuid           |                                                                     |
| clean_step             | {}                                                                  |
| console_enabled        | False                                                               |
| created_at             | 2017-02-27T09:57:55+00:00                                           |
| driver                 | fuel_ipmitool                                                       |
| driver_info            | {u'ipmi_terminal_port': 623, u'ipmi_username': u'ADMIN',            |
|                        | u'deploy_kernel': u'9a0044b2-d1c3-4605-82e3-55c4babe26c5',          |
|                        | u'ipmi_address': u'172.16.10.2', u'deploy_ramdisk': u'1e6b438c-67e4 |
|                        | -4ddd-a6ec-299689d0550b', u'ipmi_password': u'******',              |
|                        | u'deploy_squashfs': u'674a23e8-f13f-4fe1-a87d-4e1b987cb0fb'}        |
| driver_internal_info   | {u'clean_steps': None, u'is_whole_disk_image': False}               |
| extra                  | {}                                                                  |
| inspection_finished_at | None                                                                |
| inspection_started_at  | None                                                                |
| instance_info          | {}                                                                  |
| instance_uuid          | None                                                                |
| last_error             | None                                                                |
| maintenance            | False                                                               |
| maintenance_reason     | None                                                                |
| name                   | instance-1                                                          |
| power_state            | power off                                                           |
| properties             | {u'memory_mb': 125000, u'cpu_arch': u'x86_64', u'local_gb': 120,    |
|                        | u'cpus': 40, u'capabilities': u'boot_option:local'}                 |
| provision_state        | available                                                           |
| provision_updated_at   | 2017-02-28T02:17:41+00:00                                           |
| raid_config            |                                                                     |
| reservation            | None                                                                |
| target_power_state     | None                                                                |
| target_provision_state | None                                                                |
| target_raid_config     |                                                                     |
| updated_at             | 2017-02-28T02:17:43+00:00                                           |
| uuid                   | 37561c05-5e7c-4983-9ed5-714edc94216c                                |
+------------------------+---------------------------------------------------------------------+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment