Skip to content

Commit 58c7da5

Browse files
committed
Add Support For v0.74 Upgrade
- add license check to CLI upgrade command - add supoprt for v0.73 -> v0.74 upgrade - fix upgrade git url not defaulting to settings.py
1 parent 8eebafb commit 58c7da5

5 files changed

Lines changed: 481 additions & 50 deletions

File tree

CHANGELOG.md

Lines changed: 161 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@
55

66
[//]: # (END_SECTION HEADER)
77
[//]: # (START_SECTION COMMITS
8-
b9c9fd0db73086cba12a8cfdf8090afd8198c9f6
8+
c45108fbda546110b7b5bf8f78d70489fcc6450b
9+
8eebafba384a4604c3a754a2b9c708eae462b3ea
10+
e856b11068c25bd8a5bfe8ec53629d94aba1c5c7
11+
c6c4bb239aa4870dd8e24d24e68950ec76ece921
12+
c38834a439f34e16c6a8370a1609f1c501513826
13+
b1bb9d026fa0a2c5de1a28ef73f2fbeebdd39a58
14+
9e71bfb6ef03e5ae7573adabf44578691a1b0402
15+
239a79a38937b5844b47c2351118155642419320
16+
fad1ddc79f5567760d323634fe09adb5ba8cf27d
917
5cee36cfb362c6fceb14348494749a93cdb1a2d2
1018
28bf73e59979e32ba4952f8923db4aee3f25f87c
1119
d6c45d81e09759f98a897d36fe73754c261f9d4a
@@ -2240,10 +2248,159 @@ a72121b9551921aa3dced32d943c6034ba318f82
22402248
ce6c5aac0db5476dc496c34388e4f9ce2c4b86e5
22412249
b46b1e64f06f448bde78b98e3ae8228ce5f96067
22422250
END_SECTION COMMITS)
2243-
[//]: # (START_SECTION b9c9fd0db73086cba12a8cfdf8090afd8198c9f6)
2251+
[//]: # (START_SECTION c45108fbda546110b7b5bf8f78d70489fcc6450b)
2252+
### Add Support For v0.74 Upgrade
2253+
2254+
> Commit: [c45108fbda546110b7b5bf8f78d70489fcc6450b](https://github.com/dOpensource/dsiprouter/commit/c45108fbda546110b7b5bf8f78d70489fcc6450b)
2255+
> Date: Fri, 22 Dec 2023 13:47:55 -0500
2256+
> Author: Tyler Moore (tmoore@goflyball.com)
2257+
> Committer: Tyler Moore (tmoore@goflyball.com)
2258+
> Signed: Tyler Moore (devopsec) <tmoore@goflyball.com>
2259+
2260+
2261+
- - add license check to CLI upgrade command
2262+
- - add supoprt for v0.73 -> v0.74 upgrade
2263+
- - fix upgrade git url not defaulting to settings.py
2264+
2265+
2266+
---
2267+
2268+
[//]: # (END_SECTION c45108fbda546110b7b5bf8f78d70489fcc6450b)
2269+
[//]: # (START_SECTION 8eebafba384a4604c3a754a2b9c708eae462b3ea)
2270+
### DNSmasq and SElinux Fixes
2271+
2272+
> Commit: [8eebafba384a4604c3a754a2b9c708eae462b3ea](https://github.com/dOpensource/dsiprouter/commit/8eebafba384a4604c3a754a2b9c708eae462b3ea)
2273+
> Date: Thu, 21 Dec 2023 10:05:49 -0500
2274+
> Author: Tyler Moore (tmoore@goflyball.com)
2275+
> Committer: Tyler Moore (tmoore@goflyball.com)
2276+
> Signed: Tyler Moore (devopsec) <tmoore@goflyball.com>
2277+
2278+
2279+
- - fix DNSmasq integration with systemdresolved on debian
2280+
- - fix DNSmasq integration with dhclient on amazon linux
2281+
- - fix DNSmasq integration with NetworkManager on centos
2282+
- - fix SElinux support on centos
2283+
- - fix default route resolution when multiple default routes available
2284+
- - fix typo in v0.73 upgrade script
2285+
- - fix centos missing hosts template for cloud-init
2286+
2287+
2288+
---
2289+
2290+
[//]: # (END_SECTION 8eebafba384a4604c3a754a2b9c708eae462b3ea)
2291+
[//]: # (START_SECTION e856b11068c25bd8a5bfe8ec53629d94aba1c5c7)
2292+
### Fixed permissions to allow Nginx to access the the dSIPRouter UI via a UNIX socket
2293+
2294+
> Commit: [e856b11068c25bd8a5bfe8ec53629d94aba1c5c7](https://github.com/dOpensource/dsiprouter/commit/e856b11068c25bd8a5bfe8ec53629d94aba1c5c7)
2295+
> Date: Mon, 18 Dec 2023 04:09:31 +0000
2296+
> Author: Mack Hendricks (mack@dopensource.com)
2297+
> Committer: Mack Hendricks (mack@dopensource.com)
2298+
> Signed:
2299+
2300+
2301+
2302+
2303+
---
2304+
2305+
[//]: # (END_SECTION e856b11068c25bd8a5bfe8ec53629d94aba1c5c7)
2306+
[//]: # (START_SECTION c6c4bb239aa4870dd8e24d24e68950ec76ece921)
2307+
### OS And Cloud Bug Fixes
2308+
2309+
> Commit: [c6c4bb239aa4870dd8e24d24e68950ec76ece921](https://github.com/dOpensource/dsiprouter/commit/c6c4bb239aa4870dd8e24d24e68950ec76ece921)
2310+
> Date: Fri, 8 Dec 2023 14:24:42 -0500
2311+
> Author: Tyler Moore (tmoore@goflyball.com)
2312+
> Committer: Tyler Moore (tmoore@goflyball.com)
2313+
> Signed: Tyler Moore (devopsec) <tmoore@goflyball.com>
2314+
2315+
2316+
- - fix amzn2 issue with kernel headers when installing rtpengine
2317+
- - fix debian10 dependency issue when installing kamailio
2318+
- - fix missing cron dependency on AWS debian images
2319+
- - fix amazn2 libwebsockets compilation failing (bump openssl version)
2320+
- - fix AWS metadata API changed
2321+
- - fix testing regressions
2322+
- - update references to `dsiprouter.sh` to use the binary path instead
2323+
- - fix update* commands may return bad exit status to systemd
2324+
- - fix run permissions for services to work with SELinux enabled
2325+
- - fix nginx systemd service not loading on older versions
2326+
- - fix selinux DMQ port definition incorrect
2327+
- - fix license activation regression
2328+
- - update debian/ubuntu to swap out dns stack for dnsmasq/resolvconf
2329+
- - refactor dnsmasq install to use separate scripts for each OS
2330+
2331+
2332+
---
2333+
2334+
[//]: # (END_SECTION c6c4bb239aa4870dd8e24d24e68950ec76ece921)
2335+
[//]: # (START_SECTION c38834a439f34e16c6a8370a1609f1c501513826)
2336+
### Fix Callee BYE Regression
2337+
2338+
> Commit: [c38834a439f34e16c6a8370a1609f1c501513826](https://github.com/dOpensource/dsiprouter/commit/c38834a439f34e16c6a8370a1609f1c501513826)
2339+
> Date: Fri, 10 Nov 2023 15:38:51 -0500
2340+
> Author: Tyler Moore (tmoore@goflyball.com)
2341+
> Committer: Tyler Moore (tmoore@goflyball.com)
2342+
> Signed: Tyler Moore (devopsec) <tmoore@goflyball.com>
2343+
2344+
2345+
- fix callee BYE not routed to caller
2346+
- fix rtp ports exhausted by updating timeouts
2347+
2348+
2349+
---
2350+
2351+
[//]: # (END_SECTION c38834a439f34e16c6a8370a1609f1c501513826)
2352+
[//]: # (START_SECTION b1bb9d026fa0a2c5de1a28ef73f2fbeebdd39a58)
2353+
### Fix ReadTheDocs
2354+
2355+
> Commit: [b1bb9d026fa0a2c5de1a28ef73f2fbeebdd39a58](https://github.com/dOpensource/dsiprouter/commit/b1bb9d026fa0a2c5de1a28ef73f2fbeebdd39a58)
2356+
> Date: Wed, 1 Nov 2023 13:22:47 -0400
2357+
> Author: Tyler Moore (tmoore@goflyball.com)
2358+
> Committer: Tyler Moore (tmoore@goflyball.com)
2359+
> Signed: Tyler Moore (devopsec) <tmoore@goflyball.com>
2360+
2361+
2362+
- fix missing python dependencies for readthedocs
2363+
2364+
2365+
---
2366+
2367+
[//]: # (END_SECTION b1bb9d026fa0a2c5de1a28ef73f2fbeebdd39a58)
2368+
[//]: # (START_SECTION 9e71bfb6ef03e5ae7573adabf44578691a1b0402)
2369+
### Update ReadTheDocs Config
2370+
2371+
> Commit: [9e71bfb6ef03e5ae7573adabf44578691a1b0402](https://github.com/dOpensource/dsiprouter/commit/9e71bfb6ef03e5ae7573adabf44578691a1b0402)
2372+
> Date: Wed, 1 Nov 2023 09:16:06 -0400
2373+
> Author: Tyler Moore (tmoore@goflyball.com)
2374+
> Committer: Tyler Moore (tmoore@goflyball.com)
2375+
> Signed: Tyler Moore (devopsec) <tmoore@goflyball.com>
2376+
2377+
2378+
- update rtd config to [v2](https://docs.readthedocs.io/en/stable/config-file/v2.html)
2379+
2380+
2381+
---
2382+
2383+
[//]: # (END_SECTION 9e71bfb6ef03e5ae7573adabf44578691a1b0402)
2384+
[//]: # (START_SECTION 239a79a38937b5844b47c2351118155642419320)
2385+
### Fix CentOS 8/9 LibKS
2386+
2387+
> Commit: [239a79a38937b5844b47c2351118155642419320](https://github.com/dOpensource/dsiprouter/commit/239a79a38937b5844b47c2351118155642419320)
2388+
> Date: Wed, 1 Nov 2023 01:00:49 -0400
2389+
> Author: Tyler Moore (tmoore@goflyball.com)
2390+
> Committer: Tyler Moore (tmoore@goflyball.com)
2391+
> Signed: Tyler Moore (devopsec) <tmoore@goflyball.com>
2392+
2393+
2394+
- fix compiling libks/libstirshaken in centos 8/9
2395+
2396+
2397+
---
2398+
2399+
[//]: # (END_SECTION 239a79a38937b5844b47c2351118155642419320)
2400+
[//]: # (START_SECTION fad1ddc79f5567760d323634fe09adb5ba8cf27d)
22442401
### Upgrade Fixes
22452402

2246-
> Commit: [b9c9fd0db73086cba12a8cfdf8090afd8198c9f6](https://github.com/dOpensource/dsiprouter/commit/b9c9fd0db73086cba12a8cfdf8090afd8198c9f6)
2403+
> Commit: [fad1ddc79f5567760d323634fe09adb5ba8cf27d](https://github.com/dOpensource/dsiprouter/commit/fad1ddc79f5567760d323634fe09adb5ba8cf27d)
22472404
> Date: Tue, 31 Oct 2023 21:29:48 -0400
22482405
> Author: Tyler Moore (tmoore@goflyball.com)
22492406
> Committer: Tyler Moore (tmoore@goflyball.com)
@@ -2266,7 +2423,7 @@ END_SECTION COMMITS)
22662423

22672424
---
22682425

2269-
[//]: # (END_SECTION b9c9fd0db73086cba12a8cfdf8090afd8198c9f6)
2426+
[//]: # (END_SECTION fad1ddc79f5567760d323634fe09adb5ba8cf27d)
22702427
[//]: # (START_SECTION 5cee36cfb362c6fceb14348494749a93cdb1a2d2)
22712428
### Stability Improvements
22722429

dsiprouter.sh

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2846,27 +2846,23 @@ function removeInitService() {
28462846

28472847
function upgrade() {
28482848
local UPGRADE_VER CURRENT_VERSION UPGRADE_DEPENDS
2849-
local REPO_URL=${UPGRADE_REPO:-https://github.com/dOpensource/dsiprouter.git}
2849+
local REPO_URL=${UPGRADE_REPO:-"$GIT_REPO_URL"}
2850+
REPO_URL=${REPO_URL:-https://github.com/dOpensource/dsiprouter.git}
28502851
local TAG_NAME="${UPGRADE_RELEASE}-rel"
2851-
export NEW_PROJECT_DIR=${BOOTSTRAP_DIR:-/tmp/dsiprouter}
2852+
export NEW_PROJECT_DIR=/tmp/dsiprouter
28522853
export RUNNING_UPGRADE=1
28532854

28542855
# make sure mask is reset to be more permissive
28552856
# repo must be created with permissions set in the remote repo
28562857
# and we want to keep permissions from backup files as well
28572858
umask 022
28582859

2859-
# if new repo was bootstrapped onto system already, use that repo instead
2860-
if (( ${BOOTSTRAPPING_UPGRADE:-0} == 0 )); then
2861-
printdbg 'downloading new dSIPRouter project files'
2862-
rm -rf "$NEW_PROJECT_DIR" 2>/dev/null
2863-
git clone --depth 1 -c advice.detachedHead=false -b "$TAG_NAME" "$REPO_URL" "$NEW_PROJECT_DIR" || {
2864-
printerr 'failed downloading new project files'
2865-
exit 1
2866-
}
2867-
else
2868-
printdbg 'running with bootstrapped dSIPRouter project files'
2869-
fi
2860+
printdbg 'downloading new dSIPRouter project files'
2861+
rm -rf "$NEW_PROJECT_DIR" 2>/dev/null
2862+
git clone --depth 1 -c advice.detachedHead=false -b "$TAG_NAME" "$REPO_URL" "$NEW_PROJECT_DIR" || {
2863+
printerr 'failed downloading new project files'
2864+
exit 1
2865+
}
28702866

28712867
printdbg 'verifying version requirements'
28722868
UPGRADE_VER=$(jq -r -e '.version' <"${NEW_PROJECT_DIR}/resources/upgrade/${UPGRADE_RELEASE}/settings.json")
@@ -2884,13 +2880,31 @@ function upgrade() {
28842880
exit 1
28852881
}
28862882

2887-
# TODO: check license, this will be implemented in next release
2888-
# can not be done yet because we are allowing bootstrapping an upgrade
2889-
# if (( $RUN_FROM_GUI == 0 )); then
2890-
# # check shared memory
2891-
# else
2892-
# # manually query license server
2893-
# fi
2883+
if (( $RUN_FROM_GUI == 0 )); then
2884+
# check shared memory
2885+
if [[ $(${PYTHON_CMD} -c "
2886+
import os
2887+
os.chdir('${DSIP_PROJECT_DIR}/gui')
2888+
from util.ipc import STATE_SHMEM_NAME, getSharedMemoryDict
2889+
print(getSharedMemoryDict(STATE_SHMEM_NAME)['core_license_status'])
2890+
") != "3" ]]; then
2891+
printerr 'dSPIRouter core license is not valid'
2892+
exit 1
2893+
fi
2894+
else
2895+
# manually grab license status
2896+
if [[ $(${PYTHON_CMD} -c "
2897+
import os, sys
2898+
os.chdir('${DSIP_PROJECT_DIR}/gui')
2899+
sys.path.insert(0, '${DSIP_SYSTEM_CONFIG_DIR}/gui')
2900+
from modules.api.licensemanager.functions import licenseToGlobalStateVariable
2901+
import settings
2902+
print(licenseToGlobalStateVariable(settings.DSIP_CORE_LICENSE))
2903+
") != "3" ]]; then
2904+
printerr 'dSPIRouter core license is not valid'
2905+
exit 1
2906+
fi
2907+
fi
28942908

28952909
printdbg 'backing up configs just in case the upgrade fails'
28962910
# TODO: make the destination paths use our static variables as well

gui/templates/fullwidth_layout.html

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -31,32 +31,34 @@
3131
<a class="navbar-brand" href="http://dopensource.com/dsiprouter"><img
3232
src="{{ url_for('static', filename='images/dsiprouter_x50px.png') }}"></a>
3333
<ul class="nav navbar-nav navbar-right">
34-
<div class="btn-group" style="margin-right: 0.5em">
35-
{% if state.kam_reload_required == True or state.dsip_reload_required == True %}
36-
<button type="button" class="btn btn-warning" id="reload">Reload</button>
37-
<button type="button" class="btn btn-warning dropdown-toggle" id="reload-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
38-
{% else %}
39-
<button type="button" class="btn btn-primary" id="reload">Reload</button>
40-
<button type="button" class="btn btn-primary dropdown-toggle" id="reload-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
41-
{% endif %}
42-
<span class="caret"></span>
43-
<span class="sr-only">Toggle Dropdown</span>
44-
</button>
45-
<ul class="dropdown-menu" role="menu">
46-
{% if state.kam_reload_required == True %}
47-
{% set kam_reload_state="btn-warning" %}
48-
{% else %}
49-
{% set kam_reload_state="" %}
50-
{% endif %}
51-
{% if state.dsip_reload_required == True %}
52-
{% set dsip_reload_state="btn-warning" %}
53-
{% else %}
54-
{% set dsip_reload_state="" %}
55-
{% endif %}
56-
<li><a class="dropdown-item {{ kam_reload_state }}" id="reloadkam">Reload Kamailio</a></li>
57-
<li><a class="dropdown-item {{ dsip_reload_state }}" id="reload_dsip">Reload dSIPRouter</a></li>
58-
</ul>
59-
</div>
34+
<div class="btn-group" style="margin-right: 0.5em">
35+
{% if state.kam_reload_required == True or state.dsip_reload_required == True %}
36+
<button type="button" class="btn btn-warning" id="reload">Reload</button>
37+
<button type="button" class="btn btn-warning dropdown-toggle" id="reload-split" data-toggle="dropdown"
38+
aria-haspopup="true" aria-expanded="false">
39+
{% else %}
40+
<button type="button" class="btn btn-primary" id="reload">Reload</button>
41+
<button type="button" class="btn btn-primary dropdown-toggle" id="reload-split" data-toggle="dropdown"
42+
aria-haspopup="true" aria-expanded="false">
43+
{% endif %}
44+
<span class="caret"></span>
45+
<span class="sr-only">Toggle Dropdown</span>
46+
</button>
47+
<ul class="dropdown-menu" role="menu">
48+
{% if state.kam_reload_required == True %}
49+
{% set kam_reload_state="btn-warning" %}
50+
{% else %}
51+
{% set kam_reload_state="" %}
52+
{% endif %}
53+
{% if state.dsip_reload_required == True %}
54+
{% set dsip_reload_state="btn-warning" %}
55+
{% else %}
56+
{% set dsip_reload_state="" %}
57+
{% endif %}
58+
<li><a class="dropdown-item {{ kam_reload_state }}" id="reloadkam">Reload Kamailio</a></li>
59+
<li><a class="dropdown-item {{ dsip_reload_state }}" id="reload_dsip">Reload dSIPRouter</a></li>
60+
</ul>
61+
</div>
6062
<!-- <form id="qform" class="navbar-form pull-left" role="search">
6163
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
6264
<input type="text" class="form-control" placeholder="Search" />

0 commit comments

Comments
 (0)