Change in osmocom-bb[master]: Revert "mobile: use VTY bind addr from config, deprecate cmd line opt...

2018-12-22 Thread Holger Freyther
Holger Freyther has abandoned this change. ( https://gerrit.osmocom.org/12208 )

Change subject: Revert "mobile: use VTY bind addr from config, deprecate cmd 
line options"
..


Abandoned

The new feature is in.
--
To view, visit https://gerrit.osmocom.org/12208
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: Ie89bc16b667dbe05baa76cfa4f86b4946f8019e8
Gerrit-Change-Number: 12208
Gerrit-PatchSet: 1
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Harald Welte 


Change in osmocom-bb[master]: Revert "mobile: use VTY bind addr from config, deprecate cmd line opt...

2018-12-18 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/12208 )

Change subject: Revert "mobile: use VTY bind addr from config, deprecate cmd 
line options"
..


Patch Set 1:

Hi Holger,

> Something that was actively used got broken.

My apologies, I didn't know that this feature has been actively used.

Since we have an alternative solution:

https://gerrit.osmocom.org/#/c/libosmocore/+/12321/
https://gerrit.osmocom.org/#/c/osmocom-bb/+/12326/

which I've already tested (and I really like it), let's merge both
patches and abandon this one. If review would take too long, then
ok... let's revert this one and come back to it later.


--
To view, visit https://gerrit.osmocom.org/12208
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie89bc16b667dbe05baa76cfa4f86b4946f8019e8
Gerrit-Change-Number: 12208
Gerrit-PatchSet: 1
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Tue, 18 Dec 2018 16:21:55 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmocom-bb[master]: Revert "mobile: use VTY bind addr from config, deprecate cmd line opt...

2018-12-18 Thread Holger Freyther
Holger Freyther has posted comments on this change. ( 
https://gerrit.osmocom.org/12208 )

Change subject: Revert "mobile: use VTY bind addr from config, deprecate cmd 
line options"
..


Patch Set 1:

> Patch Set 1: Code-Review-1
>
> The removed options were marked as deprecated so I also don't think reverting 
> the change is the right way. Unfortunately we don't have releases in 
> osmocom-bb which would allow us to handle deprecations better.

With Linux Kernel project in our genes let me appeal to the "no userspace 
regression" mentality... Something that was actively used got broken. Instead 
of trying to explain of how it was just "deprecated" or how gray the snow is 
and this three headed monkey behind you..., let's own the problem.

Don't be afraid to revert quickly and show some sympathy/empathy with the users 
of a system.

And on the topic of deprecation:

1st) Passing --vty_port=X will fail config parsing and lead to the process to 
exit. This was noticeable to third party applications.

2nd) Deprecation gives a grace period o someone to move somewhere else, find a 
replacement. None was given...


--
To view, visit https://gerrit.osmocom.org/12208
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie89bc16b667dbe05baa76cfa4f86b4946f8019e8
Gerrit-Change-Number: 12208
Gerrit-PatchSet: 1
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Tue, 18 Dec 2018 16:07:08 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmocom-bb[master]: Revert "mobile: use VTY bind addr from config, deprecate cmd line opt...

2018-12-17 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/12208 )

Change subject: Revert "mobile: use VTY bind addr from config, deprecate cmd 
line options"
..


Patch Set 1: Code-Review-1

> Patch Set 1:
>
> From my point of view the original change should not have been submitted as 
> it takes away a feature that is actively used and causes a regression.

The removed options were marked as deprecated so I also don't think reverting 
the change is the right way. Unfortunately we don't have releases in osmocom-bb 
which would allow us to handle deprecations better.


--
To view, visit https://gerrit.osmocom.org/12208
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie89bc16b667dbe05baa76cfa4f86b4946f8019e8
Gerrit-Change-Number: 12208
Gerrit-PatchSet: 1
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Mon, 17 Dec 2018 13:10:49 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmocom-bb[master]: Revert "mobile: use VTY bind addr from config, deprecate cmd line opt...

2018-12-13 Thread Holger Freyther
Holger Freyther has posted comments on this change. ( 
https://gerrit.osmocom.org/12208 )

Change subject: Revert "mobile: use VTY bind addr from config, deprecate cmd 
line options"
..


Patch Set 1:

>From my point of view the original change should not have been submitted as it 
>takes away a feature that is actively used and causes a regression. The revert 
>seems to be the most fair option.

I will take the pain and make the vty port configurable inside the config file.


--
To view, visit https://gerrit.osmocom.org/12208
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie89bc16b667dbe05baa76cfa4f86b4946f8019e8
Gerrit-Change-Number: 12208
Gerrit-PatchSet: 1
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Thu, 13 Dec 2018 08:05:02 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmocom-bb[master]: Revert "mobile: use VTY bind addr from config, deprecate cmd line opt...

2018-12-08 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/12208 )

Change subject: Revert "mobile: use VTY bind addr from config, deprecate cmd 
line options"
..


Patch Set 1:

Hi,

 > I would prefer something else than a complete revert.

I just discovered that OsmoBTS has a VTY command to change
the VTY bind port (sorry for tautology). I suggest either
to add similar command to mobile (as a temporary solution),
or finally introduce it in libosmovty.


--
To view, visit https://gerrit.osmocom.org/12208
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie89bc16b667dbe05baa76cfa4f86b4946f8019e8
Gerrit-Change-Number: 12208
Gerrit-PatchSet: 1
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Sat, 08 Dec 2018 19:50:06 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmocom-bb[master]: Revert "mobile: use VTY bind addr from config, deprecate cmd line opt...

2018-12-08 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12208 )

Change subject: Revert "mobile: use VTY bind addr from config, deprecate cmd 
line options"
..


Patch Set 1:

(1 comment)

I would prefer something else than a complete revert. I understand both vty 
config as well as ability to bind to random ports are desirable features...

https://gerrit.osmocom.org/#/c/12208/1//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/#/c/12208/1//COMMIT_MSG@11
PS1, Line 11: start
: many "mobile"
> Oh, wow, I thought you're running a single process with […]
Its both: multiple ms per mobile, and many mobile processes. I doubt you could 
ever scale sufficiently in a single, single-threaded process



--
To view, visit https://gerrit.osmocom.org/12208
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie89bc16b667dbe05baa76cfa4f86b4946f8019e8
Gerrit-Change-Number: 12208
Gerrit-PatchSet: 1
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Sat, 08 Dec 2018 19:27:22 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmocom-bb[master]: Revert "mobile: use VTY bind addr from config, deprecate cmd line opt...

2018-12-07 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/12208 )

Change subject: Revert "mobile: use VTY bind addr from config, deprecate cmd 
line options"
..


Patch Set 1:

(2 comments)

https://gerrit.osmocom.org/#/c/12208/1//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/#/c/12208/1//COMMIT_MSG@11
PS1, Line 11: start
: many "mobile"
Oh, wow, I thought you're running a single process with
multiple 'ms' instances configured... BTW: why not?


https://gerrit.osmocom.org/#/c/12208/1//COMMIT_MSG@16
PS1, Line 16: once vty.c has a option to specify the address and
: optionally the port.
It's already possible to specify the VTY bind address, so maybe we should
introduce a new option to change the bind port instead of reverting?

I am a bit afraid that this (to be reverted) change would be forgotten.



--
To view, visit https://gerrit.osmocom.org/12208
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie89bc16b667dbe05baa76cfa4f86b4946f8019e8
Gerrit-Change-Number: 12208
Gerrit-PatchSet: 1
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Sat, 08 Dec 2018 00:47:11 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmocom-bb[master]: Revert "mobile: use VTY bind addr from config, deprecate cmd line opt...

2018-12-07 Thread Holger Freyther
Hello Vadim Yanitskiy, Pau Espin Pedrol, Max, Jenkins Builder,

I'd like you to do a code review. Please visit

https://gerrit.osmocom.org/12208

to review the following change.


Change subject: Revert "mobile: use VTY bind addr from config, deprecate cmd 
line options"
..

Revert "mobile: use VTY bind addr from config, deprecate cmd line options"

--vty-port=0 is a desirable "feature" and used by the ms_driver of the
osmo-gsm-tester. It let's the kernel pick a free port for the application
and by printing it on stdout one can still discover it. It allows to start
many "mobile" without having to worry about IP address assignment
(e.g. 127.0.0.23, 127.0.0.24).

I don't think there is a way to configure the port right now. This change
should be submitted once vty.c has a option to specify the address and
optionally the port.

This reverts commit da96b3c0aed7a63772faee91b7056dd0b3d72890.

Change-Id: Ie89bc16b667dbe05baa76cfa4f86b4946f8019e8
---
M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h
M src/host/layer23/src/mobile/app_mobile.c
M src/host/layer23/src/mobile/main.c
3 files changed, 20 insertions(+), 19 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/08/12208/1

diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h 
b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h
index 191f4ba..c2ab3c8 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h
@@ -9,7 +9,7 @@
 struct vty;

 int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *),
-   const char *config_file);
+   const char *config_file, const char *vty_ip, uint16_t vty_port);
 int l23_app_exit(void);
 int l23_app_work(int *quit);
 int mobile_delete(struct osmocom_ms *ms, int force);
diff --git a/src/host/layer23/src/mobile/app_mobile.c 
b/src/host/layer23/src/mobile/app_mobile.c
index a051fba..464cd55 100644
--- a/src/host/layer23/src/mobile/app_mobile.c
+++ b/src/host/layer23/src/mobile/app_mobile.c
@@ -39,8 +39,6 @@
 #include 
 #include 
 #include 
-
-#include 
 #include 
 #include 

@@ -436,7 +434,7 @@

 /* global init */
 int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *),
-   const char *config_file)
+   const char *config_file, const char *vty_ip, uint16_t vty_port)
 {
struct telnet_connection dummy_conn;
int rc = 0;
@@ -464,11 +462,10 @@
LOGP(DMOB, LOGL_INFO, "Using configuration from '%s'\n", 
config_file);
}
vty_reading = 0;
-   rc = telnet_init_dynif(l23_ctx, NULL,
-   vty_get_bind_addr(), OSMO_VTY_PORT_BB);
+   rc = telnet_init_dynif(l23_ctx, NULL, vty_ip, vty_port);
if (rc < 0) {
LOGP(DMOB, LOGL_FATAL, "Cannot init VTY on %s port %u: %s\n",
-   vty_get_bind_addr(), OSMO_VTY_PORT_BB, strerror(errno));
+   vty_ip, vty_port, strerror(errno));
return rc;
}

diff --git a/src/host/layer23/src/mobile/main.c 
b/src/host/layer23/src/mobile/main.c
index 9764b33..e015c30 100644
--- a/src/host/layer23/src/mobile/main.c
+++ b/src/host/layer23/src/mobile/main.c
@@ -51,6 +51,8 @@
 static char *gsmtap_ip = 0;
 static const char *custom_cfg_file = NULL;
 struct gsmtap_inst *gsmtap_inst = NULL;
+static char *vty_ip = "127.0.0.1";
+unsigned short vty_port = 4247;
 char *config_dir = NULL;
 int use_mncc_sock = 0;
 int daemonize = 0;
@@ -85,6 +87,10 @@
printf(" Some help...\n");
printf("  -h --help this text\n");
printf("  -i --gsmtap-ipThe destination IP used for GSMTAP.\n");
+   printf("  -u --vty-ip   The VTY IP to telnet to. "
+   "(default %s)\n", vty_ip);
+   printf("  -v --vty-port The VTY port number to telnet to. "
+   "(default %u)\n", vty_port);
printf("  -d --debugChange debug flags. default: %s\n",
debug_default);
printf("  -D --daemonizeRun as daemon\n");
@@ -100,13 +106,12 @@
static struct option long_options[] = {
{"help", 0, 0, 'h'},
{"gsmtap-ip", 1, 0, 'i'},
+   {"vty-ip", 1, 0, 'u'},
+   {"vty-port", 1, 0, 'v'},
{"debug", 1, 0, 'd'},
{"daemonize", 0, 0, 'D'},
{"config-file", 1, 0, 'c'},
{"mncc-sock", 0, 0, 'm'},
-   /* DEPRECATED options, to be removed */
-   {"vty-ip", 1, 0, 'u'},
-   {"vty-port", 1, 0, 'v'},
{0, 0, 0, 0},
};

@@ -124,9 +129,15 @@
case 'i':
gsmtap_ip = optarg;
break;
+   case 'u':
+