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

fixes #10286 - ensure default PXE menu can use templates proxy #2327

Closed
wants to merge 1 commit into from

Conversation

stbenjam
Copy link
Member

No description provided.

@stbenjam stbenjam changed the title fixes #10286 - ensure default PXE menu can use templates proxy [WIP] fixes #10286 - ensure default PXE menu can use templates proxy Apr 28, 2015
@lzap
Copy link
Member

lzap commented Apr 28, 2015

Ok will review later /CC

conditions[:puppet_ca_proxy_id] = id
end
conditions
end

# Helper methods for features - e.g. has_puppet? has_dns?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this appears to be squashed in from #2329, which should be reviewed first

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I broke apart a single PR into several because there was too much going on, when the other two are merged, I'll fix this one

@stbenjam stbenjam force-pushed the 10286 branch 2 times, most recently from bbce40f to 7734c27 Compare April 30, 2015 14:16
@stbenjam stbenjam changed the title [WIP] fixes #10286 - ensure default PXE menu can use templates proxy fixes #10286 - ensure default PXE menu can use templates proxy Apr 30, 2015
@stbenjam
Copy link
Member Author

@lzap Updated and ready to review @ your convenience. Much clearer as a separate commit.

Setting[:unattended_url] = "http://foreman.unattended.url"
@request.env['HTTP_REFERER'] = config_templates_path

# With Templates Proxy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split this into a new test if you can, to save this one covering multiple things. Move the general initialisation bits into a context + setup block if necessary.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem I had was there's a TFTP proxy in fixtures, so if it's not in the same test, ProxyAPI::Template gets an unexpected invocation for create_default. Any way to avoid that?

Edit: fixtures, not features

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we can delete the fixture, that'd be fantastic. If not, .delete_all in setup...

@domcleal
Copy link
Contributor

domcleal commented May 1, 2015

Everything else reviews well for me, untested.

setup do
proxy = smart_proxies(:two)
proxy.features = []
proxy.save!
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only way to avoid having this fixture TFTP proxy in the tests. It'd be nice if the feature Smart Proxies became factories, but they're used in Taxonomy tests and not touching those 👻 😨

@stbenjam
Copy link
Member Author

@domcleal Updated

@domcleal
Copy link
Contributor

This PR's fine, works perfectly. However, am I missing something here, as the smart proxy's templates module doesn't support URLs of this type as far as I can tell. Requests such as this simply 404, as there's no sinatra API request handler for it.

cobalt.example.com - - [12/May/2015:15:32:13 BST] "GET /unattended/template/Kickstart%20default/libvirt HTTP/1.1" 404 671

@stbenjam
Copy link
Member Author

Oh, d'oh. I fixed this on my smart proxy months ago and forgot to open a PR... will clean it up! Sorry 😁

@danilopopeye
Copy link

Any update on this one? Having to manually update the pxelinux.cfg/default on every new capsule. 😞

@lzap
Copy link
Member

lzap commented Jun 18, 2015

@stbenjam can help testing and reviewing! Discovery 😋 😋 😍

@stbenjam
Copy link
Member Author

stbenjam commented Sep 8, 2015

I had patched my Smart Proxy to support the template URL's but it didn't capture all cases. That would need fixing.

I don't have the bandwidth to keep fixing the endless issues with host group provisioning. If it needs fixing, it should be a feature team and allocated resources, otherwise we rely on fact-based discovery.

@stbenjam stbenjam closed this Sep 8, 2015
@stbenjam stbenjam deleted the 10286 branch September 8, 2015 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants