Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makehosts doesn't seem to handle regex properly #3409

Closed
cganglin opened this issue Jul 6, 2017 · 10 comments · Fixed by #3432
Closed

Makehosts doesn't seem to handle regex properly #3409

cganglin opened this issue Jul 6, 2017 · 10 comments · Fixed by #3432

Comments

@cganglin
Copy link

cganglin commented Jul 6, 2017

In service group i have the following regex

ip=|\D+(\d+)\D+|10.80.1.($1*2+103)|
nicips.ib0=|\D+(\d+)\D+|10.160.1.($1*2+3)|
switchport=|\D+(\d+)\D+|($1+15)|

When node definition values are correct, but after running makehosts and checking /etc/hosts the below is what i get:

10.80.1.111 sn4b sn4b.lbs.hpc
\D+(\d+)\D+ sn4b-ib0 sn4b-ib0.lbs.hpc
10.160.1.($1*2+3) sn4b-ib0 sn4b-ib0.lbs.hpc

Any ideas what to debug

@cganglin
Copy link
Author

cganglin commented Jul 6, 2017

Using xcat 2.13.5

@immarvin
Copy link
Contributor

immarvin commented Jul 6, 2017

This defect can be easily recreated with xcat 2.13.5 GA version.

hi @bybai , would you please take a look at this? thanks

@zet809
Copy link

zet809 commented Jul 6, 2017

Hi, @cganglin , this is a known issue(Duplicated with #2578 ) and we haven't fixed it yet.

@cganglin
Copy link
Author

cganglin commented Jul 6, 2017

Hi @zet809 Is there any kind of workaround for the time being, if not I have to manually update /etc/hosts and not run makehosts?

@whowutwut
Copy link
Member

To reduce the scope, We should create a reference page that shows which keywords in the node definition should have regular expression supported and which ones do not .

Of the ones that should be supported, we should test whether it's broken or not. We can then prioritize which ones should be fixed now and which ones are lower priority.

@hu-weihua We need to have some regular expression testcases created, as we don't want #3047 to happen again as we are making changes to this code.

@bybai bybai added the sprint1 label Jul 10, 2017
@bybai
Copy link
Contributor

bybai commented Jul 10, 2017

Hi @cganglin , currently, the work around is to manually update /etc/hosts . For this makehosts issue, I start to fix it within this sprint. Thanks

@bybai
Copy link
Contributor

bybai commented Jul 13, 2017

Hi @cganglin , I fixed this issue in #3432 code. You can have a try if you have time. Thanks.

@cganglin
Copy link
Author

Ok, which drop of the code I would need to use to get this change?

@whowutwut
Copy link
Member

@cganglin It was merged 1 day ago so if you update to today's build, should be there.

@hu-weihua
Copy link

@whowutwut, I will plan to add test case for this in 2.13.6 sprint2. thanks

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

Successfully merging a pull request may close this issue.

7 participants