Commit Graph

615 Commits

Author SHA1 Message Date
Pau Espin 342694150e templates: osmo-msc: Remove unused option reject cause
Commit osmo-msc 27b40c601c41fde70446ad553629494234c07662 removes this
option from default configuration as it is really not used in osmo-msc,
it comes from osmo-nitb times.

Change-Id: Iac1948113514414e7573f3bbfb3ce82e6c49adb6
2018-02-14 11:26:11 +01:00
Pau Espin 263dd3b600 modem: deactivate_context: Fix dbg message
Change-Id: Ib3cb72ebcbfbf53693a2d76ca1592ef7d394dd87
2018-02-13 22:27:46 +01:00
Holger Hans Peter Freyther 257ee10967 log: Use sys._getframe() to avoid stat(2) calls
The Osmo MS driver is launching many many processes and I would
like to use the logging framework for the code as well.
Unfortunately the inspect/traceback code will use a linecache which
will execute stat(2) on one or more python files.

Related: OS#2927
Change-Id: I8f6bacadcf74d3aa25db1e1f41644f64aa19cf92
2018-02-13 10:49:00 +00:00
Pau Espin 4792f40f6a resources.conf: Update octphy net_device
Interface naming model changed after switching to debian9. eth1 is now
named enp2s0.

Change-Id: I86422452e6fd52015361d9e8508b7c74e20847a4
2018-02-07 14:29:05 +01:00
Pau Espin 668d42f775 aoip_smpp: Since recent osmo-msc, we accept all sms in store&forward mode
Change-Id: Ieb5656f3ca93f4343441d90e30fbe904382c44e3
2018-01-30 12:31:37 +01:00
Pau Espin 031f46476c Revert "aoip_smpp: Disable check in esme_ms_sms_storeforward due to known issue"
This reverts commit 4a22ac7d2c.

Issue has been fixed in OS#2354, osmo-msc
1e67fea7ba5c6336066b78f98a28ab33b05c36c4.

Change-Id: I83d857c639db35abcd05bc87db9962d092c10eca
2018-01-29 10:56:31 +01:00
Harald Welte ab4a1f7074 osmo-bsc.cfg.tmpl: Remove bogus VTY commands
There are plenty of VTY commands that were inherited from OsmoNITB,
but which make no sense in a BSC.  Upstream OsmoBSC has removed them in
change-ids Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38,
c499e5c62e9bef0db219e4658ffeb3292d6e6a5b and
8311a81bae85618302273c3f769275893161a7d7

Change-Id: I79ff48983d9cb7b875c1859870d5e3bce2c0ef22
2017-12-19 18:55:26 +01:00
Neels Hofmeyr c6cd68ee63 cosmetic: adjust resource_test to comp128v1
Since libosmocore doesn't support XOR at all, it seems weird to use it in the
test, even though it's just a selftest without libosmocore involved...

Change-Id: I51edec255e7ef277907817b3187c2f492465467f
2017-12-18 02:28:58 +00:00
Neels Hofmeyr 0af893c79d osmo_hlr.py: fix auth algo mapping, properly indicate COMP128v1
So far the resources.conf says we're using XOR, but we wrongly map 'xor' to 1,
which is actually comp128v1 in enum osmo_auth_algo from libosmocore (which
osmo-hlr uses to interpret the numbers from the hlr.db).

This explains why our "xor" tests are succeeding even though libosmocore
doesn't support XOR at all: we were using comp128v1 all the while.

Fix the auth algo mapping:
- define correct mappings, copying enum osmo_auth_algo, in util.py
- add a function to get the enum value from name, in util.py
- use this in osmo_hlr.py

Change subscriber_add() API to take the algorithm string instead of a number.
The number is libosmocore internal and we should not expose it within our API
beyond above dict. There are no callers using this parameter yet anyway.

Adjust resources.conf to indicate COMP128v1 which we are actually using and
which means we're still using algorithm number 1 after this change.

BTW, osmo-nitb uses the ctrl interface which interprets the names, so is not
vulnerable to mapping wrong numbers and needs no fix. (If osmo-hlr featured
similar CTRL, which it doesn't yet, this code could be more robust.)

Related: OS#2758
Change-Id: I7a6ce92468a6ae46136ad4f62381da261fd196c8
2017-12-18 02:28:58 +00:00
Pau Espin b05e36aa38 modem: activate_context: print protocol too in dbg log
Change-Id: I5c2df196b924bb0cf74aadabb4544ca1fecc1eba
2017-12-15 12:40:18 +01:00
Max bee13719a3 Add git-review config
Change-Id: Icca72ab36db2a646b17abaf7c95fcd5be9527f50
2017-12-15 11:29:21 +00:00
Pau Espin 6641994d8d Set osmo-ggsn ipv6 link-local addr and enable ipv6 ctx activate test
osmo-ggsn requires a link-local IPv6 address to be added to the
tun interface, otherwise the apn will not be configured correctly and it
won't be able to allocate addresses from the ipv6 pool later on.
Some OS don't support autoconfiguring link-local IPv6 addresses when the
interface is brought up (some linux versions are known to fail at it).
This is the case for our Prod osmo-gsm-tester setup (running debian8
with kernel 3.16.51).

Make sure we configure correctly the interface by forcing osmo-ggsn to
set on the interface and use a specific IPv6 link-local address. This is
done by using the "ipv6 link-local" vty cmd in osmo-ggsn.

After this modification, we can re-enable ipv6 gprs context creation as
it will work in Prod setup.

Related: OS#2746

Change-Id: Ib291c02a3c57a4189f9c4b1b856109be97ad2a34
2017-12-15 12:08:47 +01:00
Pau Espin c1b3278af8 bts_osmo: Use correct parameters for create_pcu
Commit c9817a50ff moved code from
different BTS into a shared base class, and create_pcu method was
created to be implemented by subclasses to get a new pcu object.
However, parameters where wrongly copied over from pcu() method during
refactoring. create_pcu() has no parameters.

Change-Id: I1e95f2e658a870f86dd9d9d25f446b8efa4107a4
2017-12-15 11:49:04 +01:00
Pau Espin 81aaeefb7b cosmetic: bts_sysmo: Sort members according to scope
Change-Id: Ifc19b34660cc8d20b8db2dcf245eeb2173cd7a6a
2017-12-14 19:18:58 +01:00
Pau Espin 2e54295bbf cosmetic: bts_osmotrx: Sort members according to scope
Change-Id: I2a0771331a98b377a79aa0770c753d04a1e88db1
2017-12-14 19:18:58 +01:00
Pau Espin 4b475be9d8 cosmetic: bts_octphy: Sort members according to scope
Change-Id: I42c19bf6f5a2f9d13d60e6ce8f1bbc1cad159b4b
2017-12-14 19:18:57 +01:00
Pau Espin c9817a50ff Create bts abstract classes to avoid code duplication and ease development
A lot of code can be shared by all osmocom related BTS we currently use
(sysmo, octphy, trx). This commits moves all this easily shareable code
to an abstract class OsmoBts which all (osmocom) BTS use.

Some bits of code do not apply for osmo-bts-sysmo but it's still shared
by BTS running in the main unit (octphy, trx), for instance the pcu
socket handling. Those are put together in OsmoBtsMainUnit.

This way we have:
log.Origin<-OsmoBts<-OsmoBtsMainUnit<-OsmoBtsOctphy
log.Origin<-OsmoBts<-OsmoBtsMainUnit<-OsmoBtsTrx
log.Origin<-OsmoBts<-OsmoBtsSysmo

Also take the chance to categorize the different APIs in the new
abstract class based on their use and scope.

Some code changes while moving which were required:
- A new protected abstract API "create_pcu", which returns an object of
"pcu" interface. Subclasses implement this API returning either a
PcySysmo or a PcuOsmo object. This is needed to abstract the pcu()
getter into the base class.
- For BTS running in the main unit, pcu_sk_tmp_dir object is allocated
when first used (API pcu_socket_path()) instead of doing it in the
constructor. This is moved into OsmoBtsMainUnit

Change-Id: I86db35a7f2497d37360b2c56affa8bf6bf704ee2
2017-12-14 19:18:50 +01:00
Pau Espin f973b3d605 gprs: ping.py: Disable ipv6 ctx activate test
osmo-ggsn is failing to create tun ipv6 device in Prod main unit.
Afterwards, as the iface is not created, it cannot find its link-local
ip and it doesn't configure the ipv6 pool. Later on, when an ipv4v6 ctx
is requested, it fails because apn doesn't support ipv6 (because the
pool is not created).

Related: OS#2746

Change-Id: I018c525a8a3d108233740ee1376b2671fefbbb59
2017-12-13 19:55:35 +01:00
Pau Espin f0b8e37f32 osmo-ggsn: set cap CAP_NET_ADMIN to be able to set up tun devices
This is a temporary workaround to be able to test gprs signalling until
we set up all required bits to run osmo-ggsn in its own namespace.

Change-Id: I0a3ce16218f0274e0be09bbf2881bc21636acdf9
2017-12-13 16:08:38 +01:00
Pau Espin 1e19151867 suites: Wait for BTS to connect to BSC before continuing
Change-Id: I027e3bfb8f470a811e65e718e2a8c46809fe6396
2017-12-13 14:09:19 +00:00
Pau Espin 7bd7103736 OsmoBsc: Introduce bts_is_connected API
This can be used by tests to wait until bts is successfully connected to
BSC.

Change-Id: I2dc2be7fd802e0e77a5e6bf23c9ca03d4c4b28f2
2017-12-13 14:09:19 +00:00
Pau Espin c859eb37ad OsmoNitb: Introduce bts_is_connected API
This can be used by tests to wait until bts is successfully connected to
NITB.

Change-Id: Idb9b7087e38f638d8b8acbad6dd8ab4218746832
2017-12-13 14:09:19 +00:00
Pau Espin fd150fbb66 suites: gprs: Use inet46 APN due to ofono using IPv4v6 ctx request
Otherwise osmo-ggsn tries to allocate one IP of each type but fails
because the other APNs are ipv4-only or ipv6-only.

Change-Id: I53baa63dc1b83616a35af182cb6f56ee3d7fe38b
2017-12-12 16:44:00 +01:00
Pau Espin d22b8460e5 Revert "resources.conf: EC20 doesn't support SupplementaryServices"
This reverts commit 31b7f0f9de.

EC20 actually supports the feature. I was wrong mainly due to 2 reasons:
- I somehow failed to set the modem Online before checking for the
interface, and in that case it is not shown.
- The test I saw failing in prod is due to /gobi_0 being actually a
gobi2000 there, and the once failing was actually the gobi2000 and not
the EC20.

Change-Id: I31ad35b718e20168a75930498901015ca2015a52
2017-12-05 19:45:40 +01:00
Pau Espin fb8c6958b1 resources.conf: sierra modems support gprs
At least the signalling support we are currently running, so let's add
the gprs feature to them as they can be used to run the current tests.

Change-Id: I04459786ba76813ebaa7867bcc86afb4fa9700b9
2017-12-05 18:29:05 +01:00
Pau Espin 31b7f0f9de resources.conf: EC20 doesn't support SupplementaryServices
As the interface never appears, tests using the modem fail because we
wait for all the interfaces to be available based on the features
attribute.

Change-Id: I68fcf2b9083966ad42940e1629abe2a1a6b74095
2017-12-05 18:26:06 +01:00
Pau Espin 7ec53f5531 resources.conf: Label modems according to their type
It's difficult to know which path is which, and actually in the prod env
gobi_0 is given to gobi 2000 instead of EC20, which means the attributes
would be applying to the wrong resource.

Change-Id: If17ff9f3d9c4c74bf0aa7966b1dd2f878175a8f0
2017-12-05 18:23:54 +01:00
Pau Espin 7a4c17b661 bts_octphy: Use OsmoPcu instead of OsmoPcuSysmo
Change-Id: I81751d774ec1f61b01ccef6c21c9d38807d5d1fc
2017-12-05 17:05:27 +01:00
Pau Espin 1450436dd5 default-suites.conf: Add gprs suite
Change-Id: I6cc71529fd6e3b99b8a53c0b91377df6d3a636d3
2017-12-05 15:06:53 +01:00
Pau Espin 38523981cb default-suites.conf: Use same order for sysmocell5000 as for other bts
Change-Id: Ie9b294ef35e35a5951b72e86e8b967d2a612f177
2017-12-05 15:06:53 +01:00
Pau Espin 3c9b80d53b suites: gprs: Introduce suite with ping test
Only GPRS signalling setup is supported so far by osmo-gsm-tester, thus
we don't test sending data yet here, but at least we can already test
pdp context activation.

This test will be extended to run ping once we support setting up the
GPRS data plane in osmo-gsm-tester.

Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b
2017-12-05 15:06:53 +01:00
Pau Espin a5ed18ac7e suites: aoip_debug: Start GPRS services
Change-Id: I991d0329ff068aaa7c101a5f55ad40616faac121
2017-12-05 15:06:53 +01:00
Pau Espin de899619cf modem: Add minimal GPRS support
Up to this point we can test signalling plane: attaching to GPRS network and activating a
context.

Data plane (sending IP packets through the network) is still not
implemented as it requires setting up the network interface provided by
ofono as well as routing, and most probably move osmo-ggsn to its own
network namespace.

Change-Id: I605ba1bb1103a045a9b5d0e7215c05dfc1fe575f
2017-12-05 15:06:52 +01:00
Pau Espin 8a3a7b5146 bts_*: Add incrementing bvci and rac values
Change-Id: Ie65d7d33322c775a1040b5c81f367d882a7c2c5b
2017-12-05 15:06:52 +01:00
Pau Espin 05314b4633 OsmoBtsOctphy: Integrate with OsmoPcu and OsmoSgsn
Change-Id: I54780971d711d47b23976dd044a4a53134dd4299
2017-12-05 15:06:52 +01:00
Pau Espin 5936d8f4b1 OsmoBtsTrx: Integrate with OsmoPcu and OsmoSgsn
Change-Id: I777835345355538a945599fb088630af63dc9140
2017-12-05 15:06:51 +01:00
Pau Espin ce35d91592 OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn
Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef
2017-12-05 13:36:46 +00:00
Pau Espin e85f5c9009 Add OsmoPcu class
Change-Id: I04d8ed5e02b090d07e91669df44ce354bc6ee749
2017-12-05 12:16:31 +01:00
Pau Espin 99f79294d3 Add class OsmoPcuSysmo
Change-Id: I6fbb71df1ad36e5d7eb02f3fdd7987a178d523d3
2017-12-05 12:12:59 +01:00
Pau Espin d0a01117df bts_*: Add ready_for_pcu API
This is required to start osmo-pcu after osmo-bts is already setup and
activated. Otherwise osmo-pcu ends after connecting to socket with:
"pcu_l1_if.cpp:416 BTS not available"

Change-Id: I7209589f60bda63094336e417638906be5e273c4
2017-12-05 11:09:10 +00:00
Pau Espin 4796b359bd Add OsmoSgsn class
Change-Id: Iec370a444998c632b3615ad1a6d6f67e64e2bfeb
2017-12-05 11:09:10 +00:00
Pau Espin 30ceb5c9a2 Add OsmoGgsn class
Change-Id: I0eed70838e4e8656c4bc1337df70e631a10d69c7
2017-12-05 11:09:10 +00:00
Pau Espin f7f0636f4d resource: next_lac: Avoid using LAC 0
Change-Id: I6c1bef81040e2c6210177f04743e7acf3eb9ad8f
2017-12-05 11:09:10 +00:00
Pau Espin 0b9d0918cf osmo-bsc: Remove token cmd from config
In 3b18044859df15ffd2ad4c3e5c3d2c94a2923eb9 this command
has been dropped and is no longer recognized.

Change-Id: I98546e36f8c809e8066fe0cc0d80d0ae3276473f
2017-11-30 11:58:25 +01:00
Pau Espin b87c6bd0e7 osmo-bsc: Remove authentication cmd from config
authentication is firmly VLR land and must go away from bsc. That option
is a leftover from nitb. It will be removed at some point.

Change-Id: I3bb4189b33173245116018e437e113c6c1226639
2017-11-29 14:31:32 +01:00
Pau Espin e7ec9089ab osmo-bsc: Remove 'auth policy' cmd from config
As of osmo-bsc ad47f7108aff5438bd2c6f7c0e898f4aa3b66fbe, this command
has been dropped and is no longer recognized.

Change-Id: Id97074195f045e6872a1a7030671a06259c9ec31
2017-11-29 14:28:38 +01:00
Pau Espin f2850f50a9 defaults.conf: Add PDCH channels to test GPRS
Change-Id: I8c90e2ef14a3556b62240e335ea3147df1467657
2017-11-23 14:07:51 +01:00
Pau Espin ff1580c573 resources.conf: Add gprs feature for EC20 modem
Change-Id: I99a1e8c2fbd3856f5c1978449292871498c6bf18
2017-11-23 14:07:51 +01:00
Pau Espin 7aef3861f4 modem: Move power off sequence to separate method
Also make sure we power off the modem during cleanup, to make sure we
set it offline (and in the future, we also detach GPRS).

Change-Id: I47845f36864d494be474fdd447a4e9e0cbed1abd
2017-11-23 14:07:50 +01:00
Pau Espin e0f498627c modem: Abstract the list of required ofono interfaces
* We want to add more interfaces to this list when we add more features
(such as waiting for ConnectionManager if we want to use GPRS).

* We want to require some ifaces only if we are planning to use those
features in osmo-gsm-tester (driven by config features attribute set to
the modem in resources.conf).

* Previous usage during shutdown was wrong, as it was waiting for any of
them to be down to continue instead of waiting for all of them to be
down.

Change-Id: I56a289360018aa56fe25b3dd328ffe9194b65f6b
2017-11-23 12:45:05 +01:00