Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Fix upgrade script and make parity run when no .parity dir. #954

Merged
merged 1 commit into from Apr 14, 2016

Conversation

gavofyork
Copy link
Contributor

No description provided.

@gavofyork gavofyork added A0-pleasereview 🤓 Pull request needs code review. P0-dropeverything 🌋 Everyone should address the issue now. labels Apr 14, 2016
@General-Beck
Copy link
Contributor

check first run on clean install
ERROR: Error upgrading parity data: CannotLockVersionFile
workaround: run mkdir -p ~/.parity before running parity

use std::env;
use std::io::{Read, Write};

#[cfg_attr(feature="dev", allow(enum_variant_names))]
#[derive(Debug)]
pub enum Error {
CannotLockVersionFile,
CannotCreateConfigPath,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wrapping std::io::Error in those errors could help debugging potential problems.

@tomusdrw tomusdrw added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Apr 14, 2016
@arkpar arkpar merged commit 01e7d2d into master Apr 14, 2016
@General-Beck
Copy link
Contributor

First run
Apr 14 22:48:45 localhost ubuntu-core-launcher[2912]: ERROR: Error upgrading parity data: CannotCreateConfigPath

Apr 14 22:48:45 localhost kernel: [ 720.307940] audit: type=1400 audit(1460674125.038:72): apparmor="DENIED" operation="mkdir" profile="parity.sideload_parity_IRKcLLeOIDVJ" name="/root/.parity/" pid=2912 comm="parity" requested_mask="c" denied_mask="c" fsuid=0 ouid=0

#set data dir`
PARITY_HOME=${SNAP_APP_DATA_PATH}
export PARITY_HOME
#check first run - create data dir
$verbose && echo "parity home:" $PARITY_HOME
mkdir -p $PARITY_HOME/.parity

start parity daemon

exec ${SNAP_APP_PATH}/bin/$plat_abi/parity -d "$PARITY_HOME/.parity"

Need to add a condition that checks to see if the --db-path

@gavofyork
Copy link
Contributor Author

gavofyork commented Apr 15, 2016

actually, it's not clear what the path should be for this version config file.

@NikVolf
Copy link
Contributor

NikVolf commented Apr 15, 2016

should also add --keys-path $PARITY_HOME/.parity/keys

@General-Beck
Copy link
Contributor

and --password $PARITY_HOME/.parity/pass

@gavofyork gavofyork deleted the fixupgrade branch April 28, 2016 15:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. P0-dropeverything 🌋 Everyone should address the issue now.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants