-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement mesh upgrade package #1109
Draft
javierbrk
wants to merge
118
commits into
libremesh:master
Choose a base branch
from
javierbrk:feature/mesh-upgrade
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
118 commits
Select commit
Hold shift + click to select a range
a5f59c2
Merge branch 'master' of github.com:javierbrk/lime-packages into babe…
javierbrk 288f202
hook test
javierajorge 1f96c5d
added hook execution permision
javierajorge 75fb96a
Create lime-mesh-upgrade package
selankon 863c076
removed_files_from_other_commit
javierbrk 5757011
Merge remote-tracking branch 'origin/meshwideupdates' into feature/me…
javierbrk f259854
nuevo modelo de datos
javierbrk e9aadbd
wip ...
javierbrk 49d4e23
add uci interface
javierbrk 0d82acf
removed dependencies
javierbrk 7895145
testing uci files
javierbrk f98ac08
fixed underscore typo
javierbrk 7605733
test
javierbrk 62b6f12
Implement set_up_firmware_repository
selankon d7d3d30
mesh upgrade lib: improves tests, creates states as constants
javierbrk 2504b60
save configurations to uci and make tests pass
javierajorge 076fdd5
add inform_download_location and trigger_sheredstate_upgrade
javierajorge b7dd972
incorporates eupgrade and improves testing
javierbrk ac7c595
enables testing with real repo information
javierbrk e373d28
ads safeupgrade
javierajorge bd9e791
Merge branch 'feature/mesh-upgrade' of github.com:javierbrk/lime-pack…
javierajorge e86639d
Implement create local repository json data
selankon 12c1ad2
Implement share firmware images
selankon 4bbba91
Merge branch 'libremesh:master' into feature/mesh-upgrade
javierbrk d285f99
adds real unit test and fix start_node_download
javierajorge b905783
Add test
selankon 308f67b
Merge branch 'feature/mesh-upgrade' of github.com:selankon/lime-packa…
javierajorge f061115
Merge branch 'feature/mesh-upgrade' of github.com:selankon/lime-packa…
javierajorge 85f7f95
merge commits and use alternative eupgrade infra
javierajorge 306cb7b
Merge branch 'feature/mesh-upgrade' of github.com:javierbrk/lime-pack…
javierajorge d220532
Ensure local latest json sharing
selankon d2f00aa
Implement become_master_node
selankon c58fdad
Fix eup to eupgrade
selankon e04af02
updates the downloaded list of files
javierajorge 532ad42
fixes paths and urls to work with eupgrade
javierajorge e0458b7
helps network module return the write ip format
javierajorge e1fafc8
discards signature check on meshupgrade
javierajorge 46fe6f2
Create shared state acl.d
selankon 84ae8eb
removes transaction concept
javierajorge ab08fee
Merge branch 'feature/mesh-upgrade' of github.com:selankon/lime-packa…
javierajorge cfb0306
fixes ready for upgrade simulation for x86
javierajorge a6467f7
Refactor set_up_local_repository
selankon 5f2938c
Eliminate divisive language
selankon 95e3e77
Split become_main_node
selankon ba73b05
Fix main node status function
selankon 4aa81e8
Fix get_main_node_status and improve redeability
selankon ce16017
improves state changes
javierajorge ccbab49
Merge branch 'feature/mesh-upgrade' of github.com:selankon/lime-packa…
javierajorge 3800135
fixes start upgrade script and adds some gaurds
javierajorge eae0613
Try to fix mesh upgrade rpcd
selankon 72fdde1
lime-mesh-upgrade: enable ubus list and methods call
javierajorge 775633a
lime_mesh_upgrade: fixes test failure
javierajorge e3ac277
mesh-upgrade: delete unnecessary logs
selankon 724abf8
mesh-upgrade: add test
selankon 08402bd
lime-mesh-upgrade: fiexes json file name
javierbrk 3b67b7f
Merge branch 'feature/mesh-upgrade' from kon
javierbrk 426db52
lime-mesh-upgrade: fixes "invalid argument" and file permissions
javierbrk 088c26f
lime-mesh-upgrade: fixes tests bug related to file permission
javierajorge 2f942aa
lime-mesh-upgrade: improves testing and fixes small issues
javierajorge 3d8205f
lime-mesh-upgrade: removes unused requirements
javierajorge 084b24c
mesh-upgrade: refactor to implement get_mesh_upgrade_node_status
selankon f920940
lime_mesh_upgrade: adds fwpath
javierbrk 39c25da
Merges get node status
javierbrk 16c9567
Merge branch 'feature/mesh-upgrade' of github.com:javierbrk/lime-pack…
javierajorge 8394178
Merge branch 'libremesh:master' into feature/mesh-upgrade
javierbrk b27caa5
lime-mesh-upgrade: add eupgrade status and more rpc
javierbrk 4be266e
mesh-upgrade: refactor for name consistency
selankon e66d071
mesh-upgrade: return eupgrade status on check_eupgrade_download_failed
selankon d7ea20f
mesh-upgrade: prevent mesh_upgrade.state nill state
selankon 49c7449
mesh-upgrade: deprecate STARTING state
selankon e9e5dd9
mesh-upgrade: improve code
selankon d984674
mesh-upgrade: upgrade mesh_upgrade main node initial state
selankon 889b46d
mesh-upgrade: fix wrong uci cursor
selankon 0a9e851
mesh-upgrade: prevent start mesh wide transaction
selankon 183a131
mesh-upgrade: fixes tests and incorporates config persistence
javierbrk d65a96a
mesh-upgrade: prserve mesh config and set su_timeouts
javierbrk 85b4bbb
mesh-upgrade: adds retry on error and abort
javierbrk 6e3adea
Merge branch 'feature/mesh-upgrade' of github.com:javierbrk/lime-pack…
javierajorge d85b950
mesh_upgrade: fixes typos and add tests for confirm
javierajorge f45d888
Merge branch 'libremesh:master' into feature/mesh-upgrade
javierbrk 50242d2
lime-mesh-upgrade: add ipv4 in node status
javierbrk 5e60e13
lime-mesh-upgrade: adds rpc parameters to start_s_u
javierbrk 88c500f
mesh-upgrade: error if filenot found
javierbrk a306df7
added test case, removed luci dependency
javierajorge d99480d
added ubus dependency
javierajorge a00e9e5
use random-numgen
javierajorge 88e61e8
shared-state-async: add babel links information support
javierbrk 0bedc8a
mesh-upgrade: adds makefile dependencies
javierbrk d644536
mesh-upgrade: abort
javierbrk 2e88248
mesh-upgrade: reports time and abort scheduled upgrade
javierbrk 79e6411
mesh-upgrade: fixes became main node error
javierbrk 9734b3b
mesh-upgrade: check image is valid and add timing
javierbrk 14323cb
mesh-upgrade: fix ipv4 address, add support for sharedstate async
javierbrk e9f334f
mesh-upgrade: fix makefile dependencies
javierbrk fad984b
mesh-upgrade: fixes ip test failure
javierbrk 7c62efd
mesh-upgrade: fixes makefile error
javierbrk 0db9965
mesh-upgrade:deleted unnecesary file
javierbrk ef16fbb
Merge branch 'libremesh:master' into feature/mesh-upgrade
javierbrk c39be29
mesh_upgrade: implements delayed insert
javierajorge 98ba399
mesh-upgrade: fixes deadlock in publish
javierbrk 58a3fea
mesh-upgrade: cleans log comments
javierbrk d2ae110
mesh-upgrade: adds readme message
javierbrk d14626f
mesh-upgrade: fix ability to start a new upgrade after confirmation
javierajorge 9dcbed9
Merge branch 'libremesh:master' into feature/mesh-upgrade
javierbrk 7210e05
shared-state: remove cached possibly corrupted files from eupgrade
javierbrk 9b761d8
mesh-upgrade: create link of publish_mesh_upgrade
selankon 2828bbd
shared-state-async: avoid removing eupgrade staff
javierajorge 1f5cc43
shared-state-asymc: add simple general check
javierajorge ba6e26c
fixes verify_network_consistency apend bug
javierajorge d4332af
Merge branch 'libremesh:master' into feature/mesh-upgrade
javierbrk 8a9efc8
Merge branch 'libremesh:master' into feature/mesh-upgrade
javierbrk 7d366fc
f_mesh_up: move publisher to new location
javierbrk a03cc22
f_mesh_up: rename uci default file
javierbrk 32b40a1
f_mu: fixes #1125 by checking that safe upgrade is ready
javierbrk 937c645
f_mu: fixes publisher relocation
javierbrk 26fc404
f_mu: fix tests after publisher relocation
javierbrk 2f9794a
f_mu: fix ubus print error in get status
javierbrk c338195
f_mu: removes wget dependency
javierbrk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
include $(TOPDIR)/rules.mk | ||
|
||
PKG_NAME:=lime-mesh-upgrade | ||
PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) | ||
GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) | ||
GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) | ||
|
||
include $(INCLUDE_DIR)/package.mk | ||
|
||
define Package/$(PKG_NAME) | ||
CATEGORY:=LibreMesh | ||
MAINTAINER:=selankon <[email protected]> | ||
TITLE:=LibreMesh mesh wide firmware upgrade | ||
DEPENDS:= +lua +libubus-lua +safe-upgrade \ | ||
+shared-state-mesh_wide_upgrade | ||
|
||
PKGARCH:=all | ||
endef | ||
|
||
define Build/Compile | ||
endef | ||
|
||
define Package/$(PKG_NAME)/install | ||
$(INSTALL_DIR) $(1)/ | ||
$(CP) ./files/* $(1)/ | ||
endef | ||
|
||
$(eval $(call BuildPackage,$(PKG_NAME))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Mesh upgrade | ||
This package can help you upgrade the firmware of all the routers in a network from a single node. | ||
|
||
## Description and steps | ||
1- A node must become main node, the main node will fetch the firmware for all the others. And expose it in the local network. | ||
2- The main node announces the new firmware over shared-state-async | ||
3- Other nodes with this package will get the news and try to download the firmware. | ||
4- Once all the nodes have the firmware in their tmp folder the main node user will be able to schedule the safe upgrade of all the nodes (this last step is done synchronously). | ||
5- After the specified time (60s default) all the nodes will start the safe upgrade process and the nodes will reboot. | ||
6- The nodes will report that the new firmware has to be confirmed. | ||
7- The main node user will verify that everything is in place an press the confirm button. | ||
8- If the firmware is not confirmed after 600 seconds the routers will go back to the previous firmware. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
config mesh-upgrade 'main' | ||
option firmware_ver '' | ||
option candidate_fw '' | ||
option fw_path '' | ||
option repo_url '' | ||
option upgrade_state '' | ||
option error '0' | ||
option timestamp '0' | ||
option main_node 'NO' | ||
option retry_count '0' | ||
option safeupgrade_start_mark '0' | ||
option su_start_time_out '0' | ||
|
||
1 change: 1 addition & 0 deletions
1
packages/lime-mesh-upgrade/files/lib/upgrade/keep.d/lime-mesh-upgrade
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/etc/config/mesh-upgrade |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing new line.
I am not sure if we should use a config file per se, or this should end up into
/etc/config/lime-*
with the other configurations.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this config file main reason to exist is to keep the settings and status of the current upgrade. This is to be keep across, operating system process, reboots and sysupgrades. It is a backend mesh-upgrade state and config persistence.