Skip to content
This repository was archived by the owner on Feb 24, 2020. It is now read-only.

Conversation

@alepuccetti
Copy link
Contributor

@alepuccetti alepuccetti commented Jul 28, 2016

When a function is called by multicall, it is not possible to use errwrap
because the log pkg is not initialized yet. Also initialize the log pkg will
not show the correct indentation in the log because the new process will
start printing from the most left.

Fixes #2984

@iaguis
Copy link
Member

iaguis commented Jul 28, 2016

We can see the error message now, this time on TestAuthOauth:

https://jenkins-rkt-public.prod.coreos.systems/job/rkt-github-ci/os_type=fedora-22,stage1_flavor=coreos/755/consoleFull


08:15:32        run: 
08:15:32          └─failed to fall back to stage1 image in rkt directory (default stage1 image location is not specified)
08:15:32            └─error rendering tree store
08:15:32              └─cannot render aci
08:15:32                └─error extracting ACI
08:15:32                  └─extracttar error: exit status 1, output: error extracting tar: no such file or directory

}
if err := syscall.Chdir("/"); err != nil {
return errwrap.Wrap(errors.New("failed to chdir"), err)
return fmt.Errorf("failed to chdir: %v", err)
Copy link
Member

Choose a reason for hiding this comment

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

double space

@iaguis
Copy link
Member

iaguis commented Jul 28, 2016

A nit. LGTM after that.

When a function is called by multicall, it is not possible to use errwrap
because the log pkg is not initialized yet. Also initialize the log pkg will
not show the correct indentation in the log because the new process will
start printing from the most left.

Fixes rkt#2984
@alban
Copy link
Member

alban commented Jul 28, 2016

extracttar error: exit status 1, output: error extracting tar: no such file or directory

I wonder which file it is...
pkg/tar/tar.go:ExtractTarInsecure() could fail on UtimesNano(), on Lstat() or other... we could return better errors with the filename?

@alepuccetti alepuccetti force-pushed the alessandro/remove-errwrap-multicall branch from 391c730 to dbc4e86 Compare July 28, 2016 11:44
@alepuccetti
Copy link
Contributor Author

Patch updated. Also I enhanced the error message in case of extractFile() or UtimesNano() fail.

pkg/tar/tar.go Outdated
err = extractFile(tr, target, hdr, overwrite, editor)
if err != nil {
return err
return fmt.Errorf("%s. extractFile failed on target: %s",err, target)
Copy link
Member

Choose a reason for hiding this comment

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

target is the output directory, shouldn't we print $target/hdr.Name?

@alepuccetti alepuccetti force-pushed the alessandro/remove-errwrap-multicall branch from dbc4e86 to 1e7b1c3 Compare July 28, 2016 11:54
pkg/tar/tar.go Outdated
err = extractFile(tr, target, hdr, overwrite, editor)
if err != nil {
return err
return fmt.Errorf("extractFile failed on %s/%s: %v", target, hdr.Name, err)
Copy link
Member

@alban alban Jul 28, 2016

Choose a reason for hiding this comment

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

fmt.Errorf("could not extract file %q in %q: %v", hdr.Name, target, err)

Sometimes tests fail on `ExtractTarInsecure()` and the error message was not clear
enough to reproduce the fail. In case of error from `extractFile()` or `UtimesNano()`,
`ExtractTarInsecure()` adds the file name to the returned error.
@alepuccetti alepuccetti force-pushed the alessandro/remove-errwrap-multicall branch from 1e7b1c3 to 3c21c4a Compare July 28, 2016 11:59
@iaguis
Copy link
Member

iaguis commented Jul 28, 2016

lgtm

@alban
Copy link
Member

alban commented Jul 28, 2016

The failure on Semaphore does not seem related to this PR: "fetch: bad HTTP status code: 504" (TestFetch)

@alban
Copy link
Member

alban commented Jul 28, 2016

LGTM

@alban alban merged commit 26d9d2f into rkt:master Jul 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants