Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

nova: add workaround for sphinx-build segfault

https://bugzilla.redhat.com/707199

sphinx-build recently began segfaulting in koji when the nova_autodoc
plugin is auto-generating files.

It wasn't happening with the d4~20110816.1449 snapshot, but it's not
clear what changed since then to cause the issue. It may simply that the
size of stdout from the generate_autodoc_index.sh script has increased.

If we run generate_autodoc_index.sh directly before the build and
disable the nova_autodoc extension using $SPHINX_DEBUG, it seems to work
fine.

Note: in theory, we shouldn't have to disable the autodoc extension and
it wouldn't re-generate the files, but in order for that to work we'd
need this small fix:

   diff --git a/doc/find_autodoc_modules.sh b/doc/find_autodoc_modules.sh
   index c612b00..5bc8b46 100755
   --- a/doc/find_autodoc_modules.sh
   +++ b/doc/find_autodoc_modules.sh
   @@ -1,7 +1,7 @@
    #!/bin/bash

    NOVA_DIR='../nova/' # include trailing slash
   -DOCS_DIR='source'
   +DOCS_DIR='source/api'

    modules=''
    for x in `find ${NOVA_DIR} -name '*.py'`; do
  • Loading branch information...
commit 25b13fe05f7479d51e5fc5501fe74bf281014aff 1 parent acdfd0f
@markmc authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 SPECS/openstack-nova.spec
View
9 SPECS/openstack-nova.spec
@@ -4,7 +4,7 @@
Name: openstack-nova
Version: 2011.3
-Release: 0.3.%{milestone}%{?dist}
+Release: 0.4.%{milestone}%{?dist}
Summary: OpenStack Compute (nova)
Group: Applications/System
@@ -174,7 +174,9 @@ find nova -name \*.py -exec sed -i '/\/usr\/bin\/env python/d' {} \;
%if 0%{?with_doc}
export PYTHONPATH="$( pwd ):$PYTHONPATH"
pushd doc
-sphinx-build -b html source build/html
+# Manually auto-generate to work around sphinx-build segfault
+./generate_autodoc_index.sh
+SPHINX_DEBUG=1 sphinx-build -b html source build/html
popd
# Fix hidden-file-or-dir warnings
rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo
@@ -354,6 +356,9 @@ fi
%endif
%changelog
+* Mon Aug 29 2011 Mark McLoughlin <markmc@redhat.com> - 2011.3-0.4.d4
+- Add workaround for sphinx-build segfault
+
* Fri Aug 26 2011 Mark McLoughlin <markmc@redhat.com> - 2011.3-0.3.d4
- Update to diablo-4 milestone
- Use statically assigned uid:gid 162:162 (#732442)

0 comments on commit 25b13fe

Please sign in to comment.
Something went wrong with that request. Please try again.