run-graphite-devel-server.py do not work on solaris 11
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Graphite |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
the root cause is because 'which' unix cmd still return something even if the located cmd is not found.
$ which dummy
no dummy in /usr/bin /bin /usr/sbin /usr/cluster/bin /usr/sbin /opt/csw/bin
Here the patch files to fix run-graphite-
*** proto/opt/
--- patches/
***************
*** 17,29 ****
graphite_root = args[0]
! for name in ('django-admin', 'django-admin.py'):
! django_admin = os.popen('which %s' % name).read(
! if django_admin: break
- if not django_admin:
- print "Could not find a django-admin script!"
- sys.exit(1)
python_path = os.path.
--- 17,40 ----
graphite_root = args[0]
! if os.uname()[0] == 'SunOS' and os.uname()[2] == '5.11':
! for name in ('django-admin', 'django-admin.py'):
! if os.popen('which %s' % name).close() == None:
! django_admin = name
! break
! try:
! django_admin
! except NameError:
! print "Could not find a django-admin script!"
! sys.exit(1)
! else:
! for name in ('django-admin', 'django-admin.py'):
! django_admin = os.popen('which %s' % name).read(
! if django_admin: break
! if not django_admin:
! print "Could not find a django-admin script!"
! sys.exit(1)
python_path = os.path.
Changed in graphite: | |
status: | Fix Committed → Fix Released |
Fixed in r705