Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Enabling proxy_fast_alias shows "ldb_modify failed: [Invalid a… #6872

Closed
wants to merge 1 commit into from

Conversation

aborah-sudo
Copy link
Contributor

…ttribute syntax]" for id lookups.

Enabling proxy_fast_alias shows "ldb_modify failed: [Invalid attribute syntax]" for id lookups.

@justin-stephenson
Copy link
Contributor

Static code analysis / python-system-tests returns the following error

tests/test_proxy.py:62: error: Item "None" of "IdEntry | None" has no attribute "user"  [union-attr]

@aborah-sudo
Copy link
Contributor Author

Static code analysis / python-system-tests returns the following error

tests/test_proxy.py:62: error: Item "None" of "IdEntry | None" has no attribute "user"  [union-attr]

(Pdb) result = client.tools.id(user.name)
(Pdb) result
{user=(10001,"user-1"),group=(10001,"None"),groups=[(10001,"None")]}
(Pdb) result.user.name
'user-1'
(Pdb) user.name
'user-1'
(Pdb) result.user.name == user.name
True
(Pdb)

I dont see any error . Also https://tests.sssd.io/en/latest/guides/using-roles.html

@justin-stephenson
Copy link
Contributor

Static code analysis / python-system-tests returns the following error

tests/test_proxy.py:62: error: Item "None" of "IdEntry | None" has no attribute "user"  [union-attr]

(Pdb) result = client.tools.id(user.name) (Pdb) result {user=(10001,"user-1"),group=(10001,"None"),groups=[(10001,"None")]} (Pdb) result.user.name 'user-1' (Pdb) user.name 'user-1' (Pdb) result.user.name == user.name True (Pdb)

I dont see any error . Also https://tests.sssd.io/en/latest/guides/using-roles.html

I think you need to add assert result is not None after result = client.tools.id(user.name)

@aborah-sudo aborah-sudo force-pushed the attribute branch 3 times, most recently from 9279c54 to 76f11b4 Compare August 12, 2023 05:05
@justin-stephenson
Copy link
Contributor

@aborah-sudo Thanks for the test, do we wait to merge normally with tests like this? (As it will fail until a code fix is merged upstream)

@aborah-sudo
Copy link
Contributor Author

aborah-sudo commented Aug 14, 2023

@aborah-sudo Thanks for the test, do we wait to merge normally with tests like this? (As it will fail until a code fix is merged upstream)

We can wait. Can be merged after the patch is upstream Or when time to test . Now you can provide the approval though .

@justin-stephenson
Copy link
Contributor

@aborah-sudo Thanks for the test, do we wait to merge normally with tests like this? (As it will fail until a code fix is merged upstream)

We can wait. Can be merged after the patch is upstream Or when time to test . Now you can provide the approval though .

Okay let's wait.

@justin-stephenson
Copy link
Contributor

@aborah-sudo Tests fail with the below error, is it expected?

 FAILED tests/test_proxy.py::test_invalid_attribute_syntax (ldap) - pytest_mh.ssh.SSHProcessError: 
Command #5112 exited with return code 4:
  Command:
    systemctl restart "nslcd" || systemctl status "nslcd"
  CWD:
  Env:
  Output:
  Error output:
    Failed to restart nslcd.service: Unit nslcd.service not found.
    Unit nslcd.service could not be found.

@justin-stephenson
Copy link
Contributor

@aborah-sudo Tests fail with the below error, is it expected?

 FAILED tests/test_proxy.py::test_invalid_attribute_syntax (ldap) - pytest_mh.ssh.SSHProcessError: 
Command #5112 exited with return code 4:
  Command:
    systemctl restart "nslcd" || systemctl status "nslcd"
  CWD:
  Env:
  Output:
  Error output:
    Failed to restart nslcd.service: Unit nslcd.service not found.
    Unit nslcd.service could not be found.

Is it because you are testing locally with SSSD/sssd-test-framework#28 ?

@aborah-sudo
Copy link
Contributor Author

aborah-sudo commented Aug 23, 2023

@aborah-sudo Tests fail with the below error, is it expected?

 FAILED tests/test_proxy.py::test_invalid_attribute_syntax (ldap) - pytest_mh.ssh.SSHProcessError: 
Command #5112 exited with return code 4:
  Command:
    systemctl restart "nslcd" || systemctl status "nslcd"
  CWD:
  Env:
  Output:
  Error output:
    Failed to restart nslcd.service: Unit nslcd.service not found.
    Unit nslcd.service could not be found.

@justin-stephenson you need to install "yum install -y nss-pam-ldapd" . For RHEL8 it will install . But for RHEL9 or Fedora you need to add package : https://copr.devel.redhat.com/coprs/sbose/nss-pam-ldapd/

@aborah-sudo
Copy link
Contributor Author

@aborah-sudo Tests fail with the below error, is it expected?

 FAILED tests/test_proxy.py::test_invalid_attribute_syntax (ldap) - pytest_mh.ssh.SSHProcessError: 
Command #5112 exited with return code 4:
  Command:
    systemctl restart "nslcd" || systemctl status "nslcd"
  CWD:
  Env:
  Output:
  Error output:
    Failed to restart nslcd.service: Unit nslcd.service not found.
    Unit nslcd.service could not be found.

Is it because you are testing locally with SSSD/sssd-test-framework#28 ?

No, its nslcd module i am trying to add to new test framework. If it merges i can remove the nslcd config part from this PR .

@justin-stephenson
Copy link
Contributor

@aborah-sudo are you able to test #6901 allows this test to pass?

@aborah-sudo
Copy link
Contributor Author

@aborah-sudo are you able to test #6901 allows this test to pass?

============================================================================================================ test session starts =============================================================================================================
platform linux -- Python 3.11.4, pytest-7.4.0, pluggy-1.2.0 -- /home/aborah/Documents/Office/sssd/new_sssd/new_framwrok_repo/current/.venv/bin/python3
cachedir: .pytest_cache
rootdir: /home/aborah/Documents/Office/sssd/new_sssd/new_framwrok_repo/current/sssd_work/src/tests/system
configfile: pytest.ini
plugins: output-1.0.0
collected 1 item

tests_local/test_proxy.py::test_invalid_attribute_syntax (ldap) PASSED [100%]

============================================================================================================= 1 passed in 6.07s ==============================================================================================================
(.venv) [aborah@fedora system]$

Passed

Copy link
Contributor

@justin-stephenson justin-stephenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, thank you.

@justin-stephenson
Copy link
Contributor

@aborah-sudo Now that the fix is merged please rebase this PR on master, system tests should pass now.

…ttribute syntax]" for id lookups.

Enabling proxy_fast_alias shows "ldb_modify failed: [Invalid attribute syntax]" for id lookups.
@alexey-tikhonov
Copy link
Member

Pushed PR: #6872

  • master
    • bcbc0b3 - Tests: Enabling proxy_fast_alias shows "ldb_modify failed: [Invalid attribute syntax]" for id lookups.
  • sssd-2-9
    • 45fbcd9 - Tests: Enabling proxy_fast_alias shows "ldb_modify failed: [Invalid attribute syntax]" for id lookups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants