[GSoC PATCH 3/9] Jailhouse driver: Implementation of ConnectGetType

--- src/jailhouse/jailhouse_driver.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/jailhouse/jailhouse_driver.c b/src/jailhouse/jailhouse_driver.c index ac9da4c85d..75bf41fc11 100644 --- a/src/jailhouse/jailhouse_driver.c +++ b/src/jailhouse/jailhouse_driver.c @@ -32,8 +32,10 @@ #include "viralloc.h" #include "virfile.h" #include "virlog.h" +#include "virutil.h" #include "vircommand.h" #include "virpidfile.h" +#include "access/viraccessapicheck.h" #define VIR_FROM_THIS VIR_FROM_JAILHOUSE @@ -241,16 +243,19 @@ jailhouseStateInitialize(bool privileged G_GNUC_UNUSED, static const char * jailhouseConnectGetType(virConnectPtr conn) { - UNUSED(conn); - return NULL; + if (virConnectGetTypeEnsureACL(conn) < 0) + return NULL; + return "JAILHOUSE"; } static char * jailhouseConnectGetHostname(virConnectPtr conn) { - UNUSED(conn); - return NULL; + if (virConnectGetHostnameEnsureACL(conn) < 0) + return NULL; + + return virGetHostname(); } static int @@ -263,7 +268,7 @@ jailhouseNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info) static int jailhouseConnectListAllDomains(virConnectPtr conn, - virDomainPtr ** domain, unsigned int flags) + virDomainPtr **domain, unsigned int flags) { UNUSED(conn); UNUSED(domain); @@ -300,7 +305,6 @@ jailhouseDomainCreate(virDomainPtr domain) { UNUSED(domain); return -1; - } static int @@ -350,18 +354,18 @@ static virHypervisorDriver jailhouseHypervisorDriver = { .connectOpen = jailhouseConnectOpen, /* 6.3.0 */ .connectClose = jailhouseConnectClose, /* 6.3.0 */ .connectListAllDomains = jailhouseConnectListAllDomains, /* 6.3.0 */ - .domainLookupByID = jailhouseDomainLookupByID, /* 6.3.0 */ - .domainLookupByUUID = jailhouseDomainLookupByUUID, /* 6.3.0 */ - .domainLookupByName = jailhouseDomainLookupByName, /* 6.3.0 */ - .domainGetXMLDesc = jailhouseDomainGetXMLDesc, /* 6.3.0 */ - .domainCreate = jailhouseDomainCreate, /* 6.3.0 */ .connectGetType = jailhouseConnectGetType, /* 6.3.0 */ .connectGetHostname = jailhouseConnectGetHostname, /* 6.3.0 */ - .nodeGetInfo = jailhouseNodeGetInfo, /* 6.3.0 */ + .domainCreate = jailhouseDomainCreate, /* 6.3.0 */ .domainShutdown = jailhouseDomainShutdown, /* 6.3.0 */ .domainDestroy = jailhouseDomainDestroy, /* 6.3.0 */ .domainGetInfo = jailhouseDomainGetInfo, /* 6.3.0 */ .domainGetState = jailhouseDomainGetState, /* 6.3.0 */ + .domainLookupByID = jailhouseDomainLookupByID, /* 6.3.0 */ + .domainLookupByUUID = jailhouseDomainLookupByUUID, /* 6.3.0 */ + .domainLookupByName = jailhouseDomainLookupByName, /* 6.3.0 */ + .domainGetXMLDesc = jailhouseDomainGetXMLDesc, /* 6.3.0 */ + .nodeGetInfo = jailhouseNodeGetInfo, /* 6.3.0 */ }; -- 2.17.1

How did you post the patches? Normally I'd say that the first 2 may have got stuck in the queue due to size restrictions and they'd have to be moderated, but the cover letter is missing too, which, unless you wrote a massive article in there, never happens, so I'm curious how you posted them so we can help. Like I mentioned in your MR that you also opened against libvirt on GitLab, the patches don't contain the mandatory Signed-off-by tag, so you have to resend them anyway. Regards, Erik

Hi Erik, Thanks for looking into my patch set!. I posted the patch set(PATCH 0-9) including the cover letter through git send-email only from my personal email Id(prakharbansal0910@gmail.com). Yesterday, only PATCH (3-9) were sent successfully to the mailing list and updated on the archive-list in a few minutes, but I got the message blocked error for PATCH 0-2 on the Gmail account and also couldn't send the patches again as I got the error message on the terminal that your daily limit has been exceeded. My cover letter had only 4 lines of text, so not sure why it was missed too. Yesterday(Aug 30th) and Today(Aug 31st) I tried to send the complete patch set again from my other account(itsprakhar@gmail.com) because I have to submit the work product in the GSoC's final evaluation today but that time none of the patches were sent to a mailing list or updated in the archive-list. Now, I see that all patches(0-9) are added to the archive-list. I used the same email server, port as I used with other account. https://www.redhat.com/archives/libvir-list/2020-August/thread.html I Apologize for missing the mandatory sign-off in my patches. I will try again to send the complete patch set along with the sign-off-by field. I'm not sure why PATCH 0-2 sent from account prakharbansal0910@gmail.com <prakharbansal0910@gmail.com> were not delivered to the mailing list yesterday. Thanks, Prakhar On Mon, Aug 31, 2020 at 11:23 PM Erik Skultety <eskultet@redhat.com> wrote:
How did you post the patches? Normally I'd say that the first 2 may have got stuck in the queue due to size restrictions and they'd have to be moderated, but the cover letter is missing too, which, unless you wrote a massive article in there, never happens, so I'm curious how you posted them so we can help.
Like I mentioned in your MR that you also opened against libvirt on GitLab, the patches don't contain the mandatory Signed-off-by tag, so you have to resend them anyway.
Regards, Erik

On Tue, Sep 01, 2020 at 12:24:11AM -0700, Prakhar Bansal wrote:
Hi Erik,
Thanks for looking into my patch set!.
I posted the patch set(PATCH 0-9) including the cover letter through git send-email only from my personal email Id(prakharbansal0910@gmail.com). Yesterday, only PATCH (3-9) were sent successfully to the mailing list and updated on the archive-list in a few minutes, but I got the message blocked error for PATCH 0-2 on the Gmail account and also couldn't send the patches again as I got the error message on the terminal that your daily limit has been exceeded. My cover letter had only 4 lines of text, so not sure why it was missed too.
Yesterday(Aug 30th) and Today(Aug 31st) I tried to send the complete patch set again from my other account(itsprakhar@gmail.com) because I have to submit the work product in the GSoC's final evaluation today but that time none of the patches were sent to a mailing list or updated in the archive-list. Now, I see that all patches(0-9) are added to the archive-list. I used the same email server, port as I used with other account. https://www.redhat.com/archives/libvir-list/2020-August/thread.html
I Apologize for missing the mandatory sign-off in my patches. I will try again to send the complete patch set along with the sign-off-by field. I'm not sure why PATCH 0-2 sent from account prakharbansal0910@gmail.com <prakharbansal0910@gmail.com> were not delivered to the mailing list yesterday.
I'd be very much curious why it's happening because the limit should be around 500 emails IIRC. No worries, just make sure next time you respin the patches, try using an account where you're positive you cannot hit the limit and if it happens again, contact the google support. Erik

On 9/1/20 8:23 AM, Erik Skultety wrote:
How did you post the patches? Normally I'd say that the first 2 may have got stuck in the queue due to size restrictions and they'd have to be moderated, but the cover letter is missing too, which, unless you wrote a massive article in there, never happens, so I'm curious how you posted them so we can help.
Like I mentioned in your MR that you also opened against libvirt on GitLab, the patches don't contain the mandatory Signed-off-by tag, so you have to resend them anyway.
I've talked with Prakhar on IRC yesterday and apparently, GMail SMTP server has some very strict limits as it's giving him "Daily user sending quota exceeded" error or something like that. Since we need an URL to paste in GSoC report, I've directed him to create a merge request. Michal

On Tue, Sep 01, 2020 at 09:25:10AM +0200, Michal Privoznik wrote:
On 9/1/20 8:23 AM, Erik Skultety wrote:
How did you post the patches? Normally I'd say that the first 2 may have got stuck in the queue due to size restrictions and they'd have to be moderated, but the cover letter is missing too, which, unless you wrote a massive article in there, never happens, so I'm curious how you posted them so we can help.
Like I mentioned in your MR that you also opened against libvirt on GitLab, the patches don't contain the mandatory Signed-off-by tag, so you have to resend them anyway.
I've talked with Prakhar on IRC yesterday and apparently, GMail SMTP server has some very strict limits as it's giving him "Daily user sending quota exceeded" error or something like that. Since we need an URL to paste in GSoC report, I've directed him to create a merge request.
Oh, okay, that's indeed strange. The merge request makes complete sense in that case - I closed it, but that's irrelevant to GSoC purposes, the reference is not going anywhere. Erik
participants (3)
-
Erik Skultety
-
Michal Privoznik
-
Prakhar Bansal