ceph / ceph-ansible

Ansible playbooks to deploy Ceph, the distributed filesystem.
Apache License 2.0
1.68k stars 1.01k forks source link

Error creating ceph.conf #2876

Closed verdurin closed 6 years ago

verdurin commented 6 years ago

I'm seeing this error when I try to create a luminous cluster:

fatal: [ceph0]: FAILED! => {
    "msg": "'dict object' has no attribute u'ipv4'"
}

This is presumably because that interface has no IP address yet.

If I change the monitor_interface to refer to an interface that already has an IP, I see this error:

fatal: [ceph0]: FAILED! => {
    "msg": "No first item, sequence was empty."
}

Here are the values I've added to group_vars/all.yml:

osd_scenario: lvm
osd_objectstore: bluestore
lvm_volumes:
  - data: /dev/sda
    db: db-sda-lv
    db_vg: pilot-ceph0
    wal: wal-sda-lv
    wal_vg: pilot-ceph0
  - data: /dev/sdb
    db: db-sdb-lv
    db_vg: pilot-ceph0
    wal: wal-sdb-lv
    wal_vg: pilot-ceph0
  - data: /dev/sdc
    db: db-sdc-lv
    db_vg: pilot-ceph0
    wal: wal-sdc-lv
    wal_vg: pilot-ceph0
  - data: /dev/sdd
    db: db-sdd-lv
    db_vg: pilot-ceph0
    wal: wal-sdd-lv
    wal_vg: pilot-ceph0
  - data: /dev/sde
    db: db-sde-lv
    db_vg: pilot-ceph0
    wal: wal-sde-lv
    wal_vg: pilot-ceph0
  - data: /dev/sdf
    db: db-sdf-lv
    db_vg: pilot-ceph0
    wal: wal-sdf-lv
    wal_vg: pilot-ceph0
  - data: /dev/sdg
    db: db-sdg-lv
    db_vg: pilot-ceph0
    wal: wal-sdg-lv
    wal_vg: pilot-ceph0
  - data: /dev/sdh
    db: db-sdh-lv
    db_vg: pilot-ceph0
    wal: wal-sdh-lv
    wal_vg: pilot-ceph0
  - data: /dev/sdi
    db: db-sdi-lv
    db_vg: pilot-ceph0
    db: db-sdi-lv
    db_vg: pilot-ceph0
    wal: wal-sdi-lv
    wal_vg: pilot-ceph0
  - data: /dev/sdj
    db: db-sdj-lv
    db_vg: pilot-ceph0
    wal: wal-sdj-lv
    wal_vg: pilot-ceph0
  - data: /dev/sdk
    db: db-sdk-lv
    db_vg: pilot-ceph0
    wal: wal-sdk-lv
    wal_vg: pilot-ceph0
  - data: /dev/sdl
    db: db-sdl-lv
    db_vg: pilot-ceph0
    wal: wal-sdl-lv
    wal_vg: pilot-ceph0

ceph_origin: "repository"

ceph_repository:  "community"

ceph_stable_release: "luminous"

radosgw_address_block: "172.16.16.0/24"

monitor_interface: "eno4"

public_network: "172.16.48.0/24"

cluster_network: "172.16.64.0/24"

ip_version: "ipv4"

I've seen the same error or very similar errors with stable-3.0, stable-3.1 and master.

guits commented 6 years ago

@verdurin Are you using ansible 2.6 ? We currently support only 2.4 and 2.5

verdurin commented 6 years ago

@guits no, it's 2.4.2.0.

guits commented 6 years ago

please, share the full playbook run log in that case

andymcc commented 6 years ago

@verdurin it'd be useful to see what facts Ansible is seeing too - using "ansible all -m setup -i inventory_file" or something similar. The error seems to suggest the network CIDR doesn't match the ip addresses on the interface - or something similar.

verdurin commented 6 years ago

Thanks for looking. The context here is that I'd been trying to do this via TripleO, and it was failing owing to device naming issues across the nodes, so I thought I'd just use plain ceph-ansible. That background meant an implicit assumption that it would setup interfaces for me, which is obviously nonsense.

verdurin commented 6 years ago

Right. Today I was using ceph-deploy, so I configured the interfaces on the nodes. Now ceph-ansible is proceeding. I do wonder if the error shown here could be improved?

Do you still want to see that information?

guits commented 6 years ago

@verdurin any chance you can provide the full log ?

verdurin commented 6 years ago

@guits you mean of the last time it failed? (it worked with properly configured interfaces)

guits commented 6 years ago

@verdurin If you have an actual issue, please, provide the log. Otherwise, I'll assume I can close this issue.

verdurin commented 6 years ago

@guits It's working for me now, so I'll close it. Thanks.