GeoNode / geonode

GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.
https://geonode.org/
Other
1.43k stars 1.12k forks source link

OWS links should be updated in GeoServer after updatelayers #759

Closed tomkralidis closed 10 years ago

tomkralidis commented 11 years ago

On the heels of #457, updatelayers should ensure that links in GeoServer's internal data configuration(s) are also updated.

To reproduce:

The hostname should have been updated per settings.SITEURL.

Note this fix must be applied to all resources GeoServer is housing in the context of GeoNode.

capooti commented 11 years ago

Tom, I would like to work on this, but I would like to know if I am understanding correctly. So, whenever we change the settings.SITEURL and run an updatelayers, the url field of any link django entities should reflect this? And the geoserver metadata links as well? And, similarly, if changing the settings.GEOSERVER_BASE_URL, should we also update the ows url field of maplayers entities? And what about the url in layer params field of maplayers entities?

tomkralidis commented 11 years ago

@capooti yes, whenever settings.SITEURL is updated, one should run python manage.py updatelayers. When that runs, all links (https://github.com/GeoNode/geonode/blob/master/geonode/layers/models.py#L466) should be updated in the Django DB, then the metadata links should be updated in GeoServer config. Same with settings.GEOSERVER_BASE_URL. Again, the only trigger here would on updatelayers, AFAIK.

I think that catches all cases.

tomkralidis commented 11 years ago

@capooti when I try to change settings.GEOSERVER_BASE_URL, paver start trips with:

(venv)tkralidi@hoth:~/dev/geonode/geonode-stats$ paver start -b 0.0.0.0:8000 ---> pavement.start ---> pavement.start_geoserver your GEOSERVER_BASE_URL does not match http://localhost:8080/geoserver/

So I'm wondering whether settings.GEOSERVER_BASE_URL should be messed with at all.

ischneider commented 11 years ago

@tomkralidis, I put that there to ensure sanity until the jetty-runner part was able to deal with it (the code just hasn't been written). If anyone's chomping at the bit to run on a different port, try adding a '--port 1234' (if you're using 1234) option to pavement.py where it launches jetty-runner. sorry for being brief, gotta run

ingenieroariel commented 11 years ago

Downgrading from critical

simod commented 11 years ago

This could be solved when we solve this one https://github.com/GeoNode/geonode/issues/809. Wanna close this?

ingenieroariel commented 11 years ago

This depends on a ticket we downgraded, so I am clearing the milestone too, however I still think this one is very important and can bite back third party applications like the geoserver-qgis-bridge and inasafe.

simod commented 11 years ago

@capooti thoughts about this?