Seagate / cortx-hare

CORTX Hare configures Motr object store, starts/stops Motr services, and notifies Motr of service and device faults.
https://github.com/Seagate/cortx
Apache License 2.0
13 stars 80 forks source link

RuntimeError: Unsupported facter version found at node localhost: 2.4.1 . Please use 3.14.8 or higher. #1779

Closed rickityjo closed 3 years ago

rickityjo commented 3 years ago

When I try to bootstrap my single node cluster I get this error:

[root@localhost hare]# hctl bootstrap --mkfs ~/CDF.yaml 2021-09-05 10:32:53: Generating cluster configuration...Traceback (most recent call last): File "/opt/seagate/cortx/hare/bin/../bin/cfgen", line 2164, in <module> main() File "/opt/seagate/cortx/hare/bin/../bin/cfgen", line 216, in main enrich_cluster_desc(cluster_desc, opts.mock) File "/opt/seagate/cortx/hare/bin/../bin/cfgen", line 309, in enrich_cluster_desc ipaddr_key(node['data_iface'])) File "/opt/seagate/cortx/hare/bin/../bin/cfgen", line 549, in get_facts validate_facter(hostname) File "/opt/seagate/cortx/hare/bin/../bin/cfgen", line 542, in validate_facter f'Unsupported facter version found at node {hostname}: {ver_str}. ' RuntimeError: Unsupported facter version found at node localhost: 2.4.1 . Please use 3.14.8 or higher.

vaibhavparatwar commented 3 years ago

@hessiotest please refer README in which puppet agent installation (required version) steps are given which in turn will instal required facter version.. image

https://github.com/Seagate/cortx-hare#readme Please let me know if it helps

hessio commented 3 years ago

Yes I followed the steps correctly and then I tried the previous commit before this one and the installation worked for me. I think we need to roll back this commit.

vaibhavparatwar commented 3 years ago

@hessio This commit was made for some reason. I think one more change we need to do is add a step in readme which will check if already Facter is installed and if yes, what version. If its lesser than 3.14.8 then, we need to remove existing older version.

hessio commented 3 years ago

Oh ok cool, we can do this, but maybe we revert this commit until it is working completely? Because if you follow the guide as is now you will get an error, what do you think?

vaibhavparatwar commented 3 years ago

Actually the issue comes only on the systems where the facter is already installed .. so its not that it fails 100% of the time.. @pavankrishnat already started working on making changes to README. let me know if that helps?

hessio commented 3 years ago

Ok but it doesn't work right now

I will message @pavankrishnat to see

vaibhavparatwar commented 3 years ago

@hessio https://github.com/Seagate/cortx-hare/pull/1781 this PR is raised for the issue. I think you already have tested it with @pavankrishnat . Thanks.

mengwanguc commented 3 years ago

I'm having the same problem.

In my case, my machine doesn't have facter pre-installed. But facter 2.4.1 was installed during the installation of motr.

Also, puppet agent installation doesn't install facter for me. @vaibhavparatwar

mengwanguc commented 3 years ago

Hi @hessio , what's the commit that you used to successfully install hare?

mengwanguc commented 3 years ago

It turns out that facter was installed in /opt/puppetlabs/bin/facter after the installation of puppet. Therefore, I have to do the link in order to use the latest facter:

ln -s /opt/puppetlabs/bin/facter /usr/bin/facter

hessio commented 3 years ago

Hi @mengwanguc so you need to uninstall facter using these commands:

rm -rf /usr/bin/facter
yum list installed | grep "puppet-agent"
yum remove puppet-agent.x86_64

Then you do the command in the README to install facter. Here is the command:

sudo yum localinstall -y https://yum.puppetlabs.com/puppet/el/7/x86_64/puppet-agent-7.0.0-1.el7.x86_64.rpm

Then you need to create the softlink:

ln -s /opt/puppetlabs/bin/facter /usr/bin/facter

Once this is done it should work for you. This is the process I used to resolve the issue. Please let me know if this works for you.

mengwanguc commented 3 years ago

Hi @hessio , thanks!

Yes, that's exactly what I did to resolve the issue.

I think what is missing from the PR #1783 is the linking step:

ln -s /opt/puppetlabs/bin/facter /usr/bin/facter

I did struggled for hours in order to figure this out. Perhaps @vaibhavparatwar should add this linking step to the PR.

cortx-admin commented 3 years ago

Pavan Krishna Thunuguntla commented in Jira Server:

https://github.com/Seagate/cortx-hare/pull/1783

cortx-admin commented 3 years ago

Pavan Krishna Thunuguntla commented in Jira Server:

.

cortx-admin commented 3 years ago

Pavan Krishna Thunuguntla commented in Jira Server:

.

cortx-admin commented 3 years ago

Gaurav Chaudhari commented in Jira Server:

{panel:bgColor=#c1c7d0}h2. hare - stable branch build pipeline SUCCESS h3. Build Info:

cortx-admin commented 3 years ago

Vaibhav Prakash Paratwar commented in Jira Server:

adding Agile Team cc [~520513] [~744287]