<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, May 29, 2018 at 11:42 AM, Milan Kovacik <span dir="ltr"><<a href="mailto:mkovacik@redhat.com" target="_blank">mkovacik@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Tue, May 29, 2018 at 5:13 PM, Dennis Kliban <<a href="mailto:dkliban@redhat.com" target="_blank">dkliban@redhat.com</a>> wrote:<br>
> On Tue, May 29, 2018 at 10:41 AM, Milan Kovacik <<a href="mailto:mkovacik@redhat.com" target="_blank">mkovacik@redhat.com</a>> wrote:<br>
>><br>
>> Good point!<br>
>> More the second; it might be a bit crazy to utilize Squid for that but<br>
>> first, let's answer the why ;)<br>
>> So why does Pulp need to store the content here?<br>
>> Why don't we point the users to the Squid all the time (for the lazy<br>
>> repos)?<br>
><br>
><br>
> Pulp's Streamer needs to fetch and store the content because that's Pulp's<br>
> primary responsibility.<br>
<br>
</span>Maybe not that much the storing but rather the content views management?<br>
I mean the partitioning into repositories, promoting.<br>
<span><br></span></blockquote><div><br></div><div>Exactly this. We want Pulp users to be able to reuse content that was brought in using the 'on_demand' download policy in other repositories.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
If some of the content lived in Squid and some lived<br>
> in Pulp, it would be difficult for the user to know what content is actually<br>
> available in Pulp and what content needs to be fetched from a remote<br>
> repository.<br>
<br>
</span>I'd say the rule of the thumb would be: lazy -> squid, regular -> pulp<br>
so not that difficult.<br>
Maybe Pulp could have a concept of Origin, where folks upload stuff to<br>
a Pulp repo, vs. Proxy for it's repo storage policy?<br>
<span><br></span></blockquote><div><br></div><div>Squid removes things from the cache at some point. You can probably configure it to never remove anything from the cache, but then we would need to implement orphan cleanup that would work across two systems: pulp and squid.<br><br></div><div>Answering that question would still be difficult. Not all content that is in the repository that was synced using on_demand download policy will be in Squid - only the content that has been requested by clients. So it's still hard to know which of the content units have been downloaded and which have not been. <br><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
><br>
> As Pulp downloads an Artifact, it calculates all the checksums and it's<br>
> size. It then performs validation based on information that was provided<br>
> from the RemoteArtifact. After validation is performed, the Artifact, is<br>
> saved to the database and it's final place in /var/lib/content/artifacts/.<br>
<br>
</span>This could be still achieved by storing the content just temporarily<br>
in the Squid proxy i.e use Squid as the content source, not the disk.<br>
<span><br>
> Once this information is in the database, Pulp's web server can serve the<br>
> content without having to involve the Streamer or Squid.<br>
<br>
</span>Pulp might serve just the API and the metadata, the content might be<br>
redirected to the Proxy all the time, correct?<br>
Doesn't Crane do that btw?<br></blockquote><div><br></div><div>Theoretically we could do this, but in practice we would run into problems when we needed to scale out the Content app. Right now when the Content app needs to be scaled, a user can launch another machine that will run the Content app. Squid does not support that kind of scaling. Squid can only take advantage of additional cores in a single machine. <br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
milan<br>
<div class="m_-599862276117273352m_-540334934317379926HOEnZb"><div class="m_-599862276117273352m_-540334934317379926h5"><br>
><br>
> -dennis<br>
><br>
><br>
><br>
><br>
><br>
>><br>
>><br>
>> --<br>
>> cheers<br>
>> milan<br>
>><br>
>> On Tue, May 29, 2018 at 4:25 PM, Brian Bouterse <<a href="mailto:bbouters@redhat.com" target="_blank">bbouters@redhat.com</a>><br>
>> wrote:<br>
>> ><br>
>> > On Mon, May 28, 2018 at 9:57 AM, Milan Kovacik <<a href="mailto:mkovacik@redhat.com" target="_blank">mkovacik@redhat.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> Hi,<br>
>> >><br>
>> >> Looking at the diagram[1] I'm wondering what's the reasoning behind<br>
>> >> Pulp having to actually fetch the content locally?<br>
>> ><br>
>> ><br>
>> > Is the question "why is Pulp doing the fetching and not Squid?" or "why<br>
>> > is<br>
>> > Pulp storing the content after fetching it?" or both?<br>
>> ><br>
>> >> Couldn't Pulp just rely on the proxy with regards to the content<br>
>> >> streaming?<br>
>> >><br>
>> >> Thanks,<br>
>> >> milan<br>
>> >><br>
>> >><br>
>> >> [1] <a href="https://pulp.plan.io/attachments/130957" rel="noreferrer" target="_blank">https://pulp.plan.io/attachmen<wbr>ts/130957</a><br>
>> >><br>
>> >> On Fri, May 25, 2018 at 9:11 PM, Brian Bouterse <<a href="mailto:bbouters@redhat.com" target="_blank">bbouters@redhat.com</a>><br>
>> >> wrote:<br>
>> >> > A mini-team of core devs** met to talk through lazy use cases for<br>
>> >> > Pulp3.<br>
>> >> > It's effectively the same lazy from Pulp2 except:<br>
>> >> ><br>
>> >> > * it's now built into core (not just RPM)<br>
>> >> > * It disincludes repo protection use cases because we haven't added<br>
>> >> > repo<br>
>> >> > protection to Pulp3 yet<br>
>> >> > * It disincludes the "background" policy which based on feedback from<br>
>> >> > stakeholders provided very little value<br>
>> >> > * it will no longer will depend on Twisted as a dependency. It will<br>
>> >> > use<br>
>> >> > asyncio instead.<br>
>> >> ><br>
>> >> > While it is being built into core, it will require minimal support by<br>
>> >> > a<br>
>> >> > plugin writer to add support for it. Details in the epic below.<br>
>> >> ><br>
>> >> > The current use cases along with a technical plan are written on this<br>
>> >> > epic:<br>
>> >> > <a href="https://pulp.plan.io/issues/3693" rel="noreferrer" target="_blank">https://pulp.plan.io/issues/36<wbr>93</a><br>
>> >> ><br>
>> >> > We're putting it out for comment, questions, and feedback before we<br>
>> >> > start<br>
>> >> > into the code. I hope we are able to add this into our next sprint.<br>
>> >> ><br>
>> >> > ** ipanova, jortel, ttereshc, dkliban, bmbouter<br>
>> >> ><br>
>> >> > Thanks!<br>
>> >> > Brian<br>
>> >> ><br>
>> >> ><br>
>> >> > ______________________________<wbr>_________________<br>
>> >> > Pulp-dev mailing list<br>
>> >> > <a href="mailto:Pulp-dev@redhat.com" target="_blank">Pulp-dev@redhat.com</a><br>
>> >> > <a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/mailman<wbr>/listinfo/pulp-dev</a><br>
>> >> ><br>
>> ><br>
>> ><br>
>><br>
>> ______________________________<wbr>_________________<br>
>> Pulp-dev mailing list<br>
>> <a href="mailto:Pulp-dev@redhat.com" target="_blank">Pulp-dev@redhat.com</a><br>
>> <a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/mailman<wbr>/listinfo/pulp-dev</a><br>
><br>
><br>
</div></div></blockquote></div><br></div></div>