-
Notifications
You must be signed in to change notification settings - Fork 77
Ztip centos kickstart update #498
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
Ztip centos kickstart update #498
Conversation
|
@RackHD/corecommitters please review. |
| @@ -245,7 +245,8 @@ wget http://<%=server%>:<%=port%>/api/current/templates/<%=rackhdCallbackScript% | |||
| esxcli system shutdown reboot -d 10 -r "Rebooting after first boot host configuration" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this is showing as a diff. I got the change from master.
https://github.com/RackHD/on-http/blob/master/data/templates/esx-ks#L248
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nucklehead I think your branch didn't rebase, so didn't include this commit 7340e79, just rebase and submit again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright thanks. I will squash the commits as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@RackHD/corecommitters please review. |
|
@mtannous this is the PR for centos-ks. |
|
@nucklehead I see that there are many meanlingless commits, could you help squash them? |
data/templates/centos-ks
Outdated
| sed -i '/^BOOTPROTO=/d' /etc/sysconfig/network-scripts/ifcfg-<%=n.device%> | ||
| sed -i '/^ONBOOT=/d' /etc/sysconfig/network-scripts/ifcfg-<%=n.device%> | ||
|
|
||
| echo 'BOOTPROTO=dhcp' >> /etc/sysconfig/network-scripts/ifcfg-<%=n.device%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ipv4 or ipv6 is not specified, Isn't DHCP the default behavior ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it is I had an issue with dhcp and thought it was related. I just verified and it is not. I will remove this from the PR
|
@nucklehead Also find many meanlingless commits. 👍 after squash the commits and rebase the branch |
|
@nucklehead Just realize that there's no 'hwaddr' in 'networkDevices' in docs http://rackhd.readthedocs.io/en/latest/rackhd/install_os.html#networkdevices , and could it be extended to other OSes? @yyscamper @pengz1 @lanchongyizu |
| %post --interpreter=busybox | ||
|
|
||
| #disable firewall | ||
| localcli network firewall set --enabled no |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which issue this change is going to fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment above. It should not show as diff I just need to rebase my branch.
data/templates/centos-ks
Outdated
| sed -i '/^BOOTPROTO=/d' /etc/sysconfig/network-scripts/ifcfg-<%=n.device%> | ||
| sed -i '/^ONBOOT=/d' /etc/sysconfig/network-scripts/ifcfg-<%=n.device%> | ||
| echo "DEVICE=<%=n.device%>" >> /etc/sysconfig/network-scripts/ifcfg-<%=n.device%> | ||
| echo "HWADDR=<%=n.hwaddr%>" >> /etc/sysconfig/network-scripts/ifcfg-<%=n.device%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think copying the ESXi design will be better, ESXi's networkDevices[].device can be either macAddress or interface name, the CentOS can also have such design. If it detects the device is MAC, then auto lookup its interface name and set the correct IP address against the interface name.
|
jenkins: ok to test |
|
Build finished. |
|
BUILD on-http #2653 : FAILURE
|
|
can you please test this please |
|
test this please |
|
Build finished. |
|
BUILD on-http #2656 : FAILURE
|
b48d58b to
380d23d
Compare
| @@ -0,0 +1,14 @@ | |||
| define({ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'define' is not defined.
| }, | ||
| "header": { | ||
| "title": "About", | ||
| "content": "<p>For more information on how to use these tasks, please also see our development guide documentation at <a href=\"http://rackhd.readthedocs.org/en/latest/development_guide.html\">http://rackhd.readthedocs.org/en/latest/development_guide.html</a></p>\n<p>©2016, EMC, Inc.</p>\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
| }); | ||
| }); | ||
|
|
||
| it('should delete an OBM instance and publish one event if node exists in obm', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
| describe("removeObmById", function() { | ||
| it('should delete an OBM instance and publish no event if no node exists in obm', function () { | ||
| var obm = { node: ''}; | ||
| var oldNode = undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not necessary to initialize 'oldNode' to 'undefined'.
| }); | ||
|
|
||
| describe("removeObmById", function() { | ||
| it('should delete an OBM instance and publish no event if no node exists in obm', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
| done(new Error("Expected service to fail")); | ||
| }) | ||
| .catch(function (e) { | ||
| expect(e).to.have.property('message').that.equals('Invalid node ID in query or body'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
| }); | ||
|
|
||
| it('should fail with nodeId that is not a string', function () { | ||
| return notificationApiService.postNodeNotification(_.assign({}, nodeNotificationMessage, {nodeId: {data: "I am an object"}})) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
| done(new Error("Expected service to fail")); | ||
| }) | ||
| .catch(function (e) { | ||
| expect(e).to.have.property('message').that.equals('Invalid node ID in query or body'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
| }); | ||
|
|
||
| it('should fail with no nodeId', function () { | ||
| return notificationApiService.postNodeNotification(_.omit(nodeNotificationMessage, 'nodeId')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
| data: 'dummy data' | ||
| }; | ||
|
|
||
| var node = {_id: nodeNotificationMessage.nodeId} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
| waterline.nodes.needByIdentifier.resolves(Promise.resolve(enclosure)); | ||
| waterline.nodes.findByIdentifier.resolves(Promise.resolve(system)); | ||
| waterline.catalogs.findLatestCatalogOfSource.resolves(Promise.resolve({ | ||
| nodeApi.getPollersByNodeId.resolves() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
| sinon.stub(waterline.catalogs); | ||
| sinon.stub(waterline.workitems); | ||
| self.sandbox.stub(waterline.nodes); | ||
| waterline.nodes.findByIdentifier.withArgs('4567efgh4567efgh4567efgh').resolves(enclosure); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
| var Errors; | ||
| var workflowApiService; | ||
| var arpCache = { | ||
| var arpCache = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arpCache' is defined but never used.
| self.sandbox.stub(views, 'get').resolves({}); | ||
| self.sandbox.stub(views, 'render').resolves('{"friendlyName": "dummy", "injectableName": "dummyName", "options": {"oids": "SNMPv2-MIB::sysDescr"}}'); | ||
| self.sandbox.stub(helper.injector.get('ejs'), 'render') | ||
| .resolves('{"friendlyName": "dummy", "injectableName": "dummyName", "options": {"oids": "SNMPv2-MIB::sysDescr"}}'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
| return helper.stopServer(); | ||
| views = helper.injector.get('Views'); | ||
| self.sandbox.stub(views, 'get').resolves({}); | ||
| self.sandbox.stub(views, 'render').resolves('{"friendlyName": "dummy", "injectableName": "dummyName", "options": {"oids": "SNMPv2-MIB::sysDescr"}}'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
| .expect(function(res){ | ||
| expect(res.body[0]) | ||
| .to.have.property('tasks') | ||
| .to.deep.equal([{"label": "create-redfish-pollers", "taskName": "/api/2.0/workflows/tasks/Task.Pollers.CreateDefault"}]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
380d23d to
39088fb
Compare
copying the ESXi design where networkDevices[].device can be either macAddress or interface name
|
BUILD on-http #2724 : UNSTABLE
|
|
I have updated the PR according to the suggestion. |
|
BUILD on-http #2728 : FAILURE
|
|
BUILD on-http #2731 : UNSTABLE
|
|
test this please |
|
@brianparry can you please merge this |
yyscamper
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thanks.
The line below was added so that the interface name is forced to be <%=n.device%>
echo "HWADDR=<%=n.hwaddr%>" >> /etc/sysconfig/network-scripts/ifcfg-<%=n.device%>See https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec-Understanding_the_Device_Renaming_Procedure.html for refence.