Bug 2361

Summary: User could not launch Hob or run bitbake if sanity network check fail
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Jiajun Xu <jiajun.xu>
Component: meta-yoctoAssignee: Joshua Lock - Disabled <josh>
Status: VERIFIED FIXED QA Contact:
Severity: critical    
Priority: High CC: dexuan.cui, dongxiao.xu, josh, poky.bs.watcher, poky.watcher, richard.purdie, sgw
Version: unspecified   
Target Milestone: 1.2 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Jiajun Xu 2012-04-23 08:35:43 UTC
tree/branch: poky/denzil
commit: 2c3d4f5beee8f57a74244495511b9294df1085ea

With latest denzil, if sanity check for network failed, we will not able to launch Hob or run bitbake. Under our corporate network, we need set proxy to pass the network check.

This will cause Hob launch failure in build appliance since by default, Hob will be launched in BA.
Comment 1 Dexuan Cui 2012-04-23 08:43:33 UTC
(In reply to comment #0)
> tree/branch: poky/denzil
> commit: 2c3d4f5beee8f57a74244495511b9294df1085ea
> 
> With latest denzil, if sanity check for network failed, we will not able to
> launch Hob or run bitbake. Under our corporate network, we need set proxy to
> pass the network check.
> 
> This will cause Hob launch failure in build appliance since by default, Hob
> will be launched in BA.

This is not a BA-specific issue.
In the host case, we still have the issue:
with the latest poky master, run "unset http_proxy" and start a new build from scratch, and we'll see this bug: the sanity check always fails so bitbake can't work...
Comment 2 Richard Purdie 2012-04-23 09:07:56 UTC
This is something hob needs to deal with, it works fine at the commandline level.

We could add some option allowing the sanity tests to be deferred, or hob could set BB_NO_NETWORK = "1", then reparse the configuration once the proxy information is setup. Regardless this is something that needs to be fixed in hob, we can add variables to control things in sanity.bbclass if needed.
Comment 3 Joshua Lock - Disabled 2012-04-23 22:07:13 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > tree/branch: poky/denzil
> > commit: 2c3d4f5beee8f57a74244495511b9294df1085ea
> > 
> > With latest denzil, if sanity check for network failed, we will not able to
> > launch Hob or run bitbake. Under our corporate network, we need set proxy to
> > pass the network check.
> > 
> > This will cause Hob launch failure in build appliance since by default, Hob
> > will be launched in BA.
> 
> This is not a BA-specific issue.
> In the host case, we still have the issue:
> with the latest poky master, run "unset http_proxy" and start a new build from
> scratch, and we'll see this bug: the sanity check always fails so bitbake can't
> work...

The sanity check is supposed to fail if the network isn't usable.
Comment 5 Dongxiao Xu 2012-04-24 05:01:27 UTC
Hi Josh and Richard,

I am a bit worry about the fix that enables the sanity check again in Hob. Suppose that if network check is failed, which means that sanity check failed and the parsing is failed. Therefore Hob could not get appropriate values set in Machine combo, Advanced Setting dialog, etc. This may result in runtime exceptions when using Hob.

My proposed fix is to split the sanity_check and parsing in Hob. After parsing is fully completed and Hob has set the right value, we issue sanity_check() in Hob. I think this could fix the problems.

My changes are in the the following branch (See the first four changes).
I know it is near the release and this change may not be acceptable, but I also think user could not accept run time exception when using Hob.

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=dxu4/hob-bugfix-temp

Sorry I need to reopen this bug.
Comment 6 Richard Purdie 2012-04-24 09:25:32 UTC
Fixed in master and on the denzil branch with the commits ending with http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=f6864c1eed5b22db68a43e3380ad7529d2f0f706
Comment 7 Jiajun Xu 2012-04-26 06:27:49 UTC
Verify the bug as fixed in denzil branch with commit d20a24310eb43fed9a3f3e75752c9ad45a18cbe4.