vitalif / vitastor

Simplified distributed block and file storage with strong consistency, like in Ceph (repository mirror)
https://vitastor.io
Other
128 stars 22 forks source link

[0.6.3] Build Err: vitastor/src/messenger.cpp:519:6: error: no declaration matches 'bool osd_messenger_t::is_rdma_enabled()' #4

Closed brucen1030 closed 3 years ago

brucen1030 commented 3 years ago

Seems that it should have been embraced by "#ifdef WITH_RDMA".

And may I have a standard /etc/vitastor/vitastor.conf ?

vitalif commented 3 years ago

Ok, I'll check.

Config file is optional, you can for example put "etcd_address": "..." there to not have to pass it everywhere. And yeah... it's probably the time to document all configuration options :-)

vitalif commented 3 years ago

Currently I have a list of all config options in a comment in mon/mon.js, but mostly without descriptions. And not all of them are meant to be put in the config file. Config file is mostly for options required to reach the cluster i.e. network, etcd address and RDMA options, maybe some timeouts and similar stuff. Runtime options are meant to be put in etcd and disk-format related options are meant to be put in both OSD options (or a superblock after I implement it) and etcd

For example with RDMA it's handy to put "rdma_gid_index" in the config file.

brucen1030 commented 3 years ago

Thanks, I noticed it in mon.js.

And the real problem is, after I built it with json11, and start it manually,
/usr/local/bin/vitastor-osd --etcd_address 172.31.4.4:2379/v3 --bind_address 172.31.4.4 --osd_num 1 --disable_data_fsync 1 --immediate_commit all --disk_alignment 4096 --journal_block_size 4096 --meta_block_size 4096 --journal_no_same_sector_overwrites true --journal_sector_buffer_count 1024 --data_device /dev/sda --journal_offset 0 --meta_offset 16777216 --data_offset 251203584

it returns:
terminate called after throwing an instance of 'std::runtime_error' what(): osd_num is required in the configuration

It should be in osd_t::parse_config().
And I think the json11::Json & config contains in fact string rather than uint64, as defined in osd_main.cpp.
While in parse_config() line 82,
osd_num = config["osd_num"].uint64_value();

It should failed and reported error above.
I don't know why but indeed the clean package under /usr/bin runs beautifully, while build from source 0.6.3 failed here. Maybe different compiler and json11? But I should be using the github.com:vitalif/json11.git, commit a4da043b17f02face92c88e24e61b03f7434c205 years ago.

Did you changed anything in json?

vitalif commented 3 years ago

I added string->uint casts to json11, the submodule has a correct version, I'm basically usinh uint64_value() for type conversions

If you get this error with the correct commit it's strange, I definitely tested 0.6.3 osds o_O

vitalif commented 3 years ago

Yeah. Correct json11 commit is 97f06cb20c1e136fd37d58fb40f57dd8f8a3a4a7. Use my submodule

brucen1030 commented 3 years ago

So you forget to pushed it to github?
https://github.com/vitalif/json11
a4da043 on Aug 16, 2016

vitalif commented 3 years ago

O_o! Maybe...

vitalif commented 3 years ago

Yeah you're right. I forgot it, it was only pushed to my git here https://yourcmc.ru/git OK, I pushed the correct commit to github too

brucen1030 commented 3 years ago

Fixed with new commit and json11 submodule updated.