GithubHelp home page GithubHelp logo

osu-net / cyder Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 11.0 37.01 MB

Cyder

License: BSD 3-Clause "New" or "Revised" License

Shell 0.42% Python 86.31% HTML 2.40% CSS 1.01% JavaScript 9.47% Puppet 0.28% Makefile 0.10%

cyder's People

Contributors

akeym avatar alecdhuse avatar church29 avatar csogilvie avatar davedash avatar drkitty avatar erikrose avatar fridgei avatar fwenzel avatar jrm2k6 avatar jwasinger avatar kumar303 avatar murrown avatar mxcosu avatar ngokevin avatar ozten avatar peterbe avatar stasm avatar tofumatt avatar uberj avatar zeeman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cyder's Issues

Failing IPv6 tests

Any test related to IPv6 has the same error:

ValidationError: [u'The router options <stuff> is not a valid ip list']

Not sure what the exact issue is but this might be resolved by @fridgei's upcoming pull request.

AttributeError: Object has no attribute _check_is_digit

This is the error raised by several tests related to Static Interface key values, including AuxAttrTests and StaticInterTests.test1_create_basic. Resolving this issue might be as simple as figuring out what _check_is_digit is supposed to do, and implementing it.

Fewer open issues

We have so many open issues that I have to click to another page to see them all. This is unacceptable. Resolve issues until they will all fit on one page.

Search and Logout buttons

They stick out past their container when selected. The should behave the same as system, dns and dhcp. There is probably some rogue css that slipped by. I would start by looking in base.scss. Don't edit base.css by the way. The .scss creates the css.

Broken relationships in Maintain

Issue transported from Chili:

zone_domain includes relationships to zones and domains that don't exist

SELECT zone_domain.domain
FROM zone_domain
WHERE (
SELECT count( * )
FROM domain
WHERE domain.id = zone_domain.domain
) = 0

returns 62 results involving missing domains, also, there is one relationship involving zone 29, which does not exist

I don't know at this time whether there are other broken relationships that need to be fixed.

Sites not appearing list view

I navigate to the list view, and all I see is the Campus site, even though I've created two new sites and confirmed that they exist in the database.

Possibly related to #32?

Ctnr search

type object 'Ctnr' has no attribute 'search_fields'
When using filters in the ctnr list page.

Network Wizard

This was from the chili repo, I assume it's an enhancement to add a network wizard.

Improve DHCP migration efficiency

I think we're probably at a wall re: DNS migrations, but there is at least one clear improvement that can be made to DHCP migrations. migrate_zone_reverse takes a huge chunk of time, the reason being that, every time a new reverse domain is created, reassign_reverse_ptrs gets called. When we create a set of domains, pointers will be assigned to the top level domain, and then get reassigned to subdomains, resulting in a lot of duplicated effort.*

I don't know whether this issue is a real priority, but if we need to do a lot of migrations leading up to the deployment deadline, it could be worth our time.

*Update: This doesn't actually matter that much. I think the real reason why reassign_reverse_ptrs takes forever is because there's at least 11000 static interfaces, and name_to_domain hits the database for each one. It could also be obj.save(), too.

Improve query performance

To reproduce the performance issue, go to:
https://cyder.nws.oregonstate.edu/core/ctnr/118/

For reference, this is the zone.core Ctnr view, with a full(?) migration of reverse domains.

Notice that visiting this page makes 674 queries. I doubt that we need to make that many queries, so we should look into reducing it, possibly via the queryset API's select_related call. Note that sometimes, using select_related can create very complex queries that actually reduce performance, so we need to ensure that we use it in such a way that does in fact improve performance.

Failing View/Permissions Test - test_create_post_guest_system

To reproduce: Run SystemViewTests
Guest users are able to create, delete, and update despite not having permission. In cyder/base/tests/test_view_template.py, even if the user does not have permission to do the action, the request is successful. Not sure yet whether this is happening because we turned permissions off at some point, or if it's something more sinister.

This is an issue for other views besides System views, as well.

RFC compliance - CNAMETests test_ptr_exists and test_ptr_cname_exists

To reproduce: Run CNAMETests
These tests ensure that a PTR record does not point to a CNAME, in compliance with RFC 1034 (maybe 1912?). There /are/ checks in place in the PTR and CNAME models, but this code has been commented out because there are/were preexisting records in Maintain that violate this rule. We need to verify that it is safe to reintroduce this code so that these tests will pass.

In other words, if we reintroduce the code and attempt a migration, and everything goes fine, then we're good to go.

Make CAS work

Configure and test django_cas (django-cas2). Requested access to campus CAS server, won't get access until Monday. I'll check out what we have in the meantime.

FAIL: test_related_networks (cyder.cydhcp.vlan.tests.VlanTests)

Traceback (most recent call last):
  File "/home/ch/cyder/cyder/cydhcp/vlan/tests.py", line 120, in test_related_networks
    self.assertEqual(v1.get_related_networks(), set([n9]))
AssertionError: Items in the second set but not the first:
<Network 223.0.0.0/10>

Not sure how this test is supposed to work. I can't see anything in the logic that might produce the desired result. Do we need to implement this feature from scratch?

CnameTests

Module has no attribute MX.
Looks like it is just a bad import.

Ctnr Detail View

Adding workgroups and ranges to be displayed in the detail view.

Not all DNS objects have detail views/appropriate detail urls

Many dns objects are children in the domain detail view rather than having their own detail view. There should be urls for all objects to their own detail view though. For example, soa/1 should send you to the domain detail page that contains soa:id=1.

Form dropdowns should be in sorted order

When I go to create a new range, I need to select a network from a dropdown list. However, the dropdown is unsorted, and there are ~600 networks to choose from. This makes the interface difficult to use.

Update UI Image in ReadMe

Please update the cyder UI image in the ReadMe file. The cyder man and dancing kid have been removed from the actual UI we should update it.

CtnrViewTests - Cannot set values on m2m field with intermediary model

To reproduce, run the CtnrViewTests.
AttributeError: Cannot set values on a ManyToManyField which specifies an intermediary model. Use ctnr.CtnrUser's Manager instead.

I believe this is an issue for many different views for models that use similar ManyToMany fields. It's worth noting that this is /not/ a problem for SystemViewTests, which were written first.

PEP8 cleanup

There are many instances of code that does not adhere to our standards. For instance, run the following command:

check.py cyder/* | grep -v migrations.000

We can't fix ALL of these issues (example: import *) but it's a start. For reference, our official coding standards can be found in README.md

Missing api/key-value tests

There are some tests that autodiscovery doesn't find:

cyder/cydns/api/tests/kv.py
cyder/cydns/api/tests/basic.py

These tests raise a familiar error, ImportError: No module named test_views_template. Are they worth salvaging?

SOA detail view is broken

In the SOA list view, there is no way to click on an soa to get to its detail view. When you try to do it manually, /soa/1, it traces back to base detail view and throws an 'obj' is undefined error.

User Detail View Ctnr Delete/Update

Both are quite broken. When trying to delete, the delete works but the page does not redirect properly and we get an list index out of range error. Update does absolutely no nothing because it is calling js the reveals a hidden form, but that form does not exist on the page.

Update form thing doesn't fill fields with current values

Note: In the following bug report, "update form" refers to the grayish box with input fields that allows one to update a single row's fields; "list view" refers to the type of display seen (e.g.) on this page in which rows are shown in a list.

In the web interface, when I click the update button in any row of a list view, the update form box slides down but none of the fields are filled with their current value. For instance, if I go to http://localhost:8000/core/system/ and click the update button in some row, the update box appears with the heading "Updating System", but every field's text box is blank and behaves as I would expect a blank text box to behave.

For some reason, this bug does not occur when in the detail view, for instance at http://localhost:8000/core/system/1.

A git-bisect shows that 5ac7293 was the commit that introduced this bug. Reverting it at the tip of master currently resolves this issue.

Maintain possibly doesn't adhere to dhcpd specs. Should Cyder?

Maintain's database currently stores some dhcpd options that don't conform to the specifications given in the dhcpd-options man page and elsewhere. The following options in the database currently specify one or more FQDNs, even though specs say they should only hold IPs:

ntp-servers
time-servers
domain-name-servers

This may mean one or more things:

  1. ISC dhcpd automagically resolves domains if necessary. (Not sure if that makes sense.)
  2. Maintain resolves the domains before giving the options to dhcpd. (Ditto.)
  3. ISC dhcpd has been dying without us noticing. (Very unlikely.)

Why does Maintain store these apparently nonconforming options?

The bigger question: Should maintain_migrate (a.) allow these apparently nonconforming options as-is, (b.) make them conform, or (c.) die when they don't pass validation?

(The current behavior is c., as far as I can tell.)

DNS ViewTests - test_private_view_case_2_addr

To reproduce: Run ViewTests.
This group of tests ensure that a validation error is raised in the following cases:

  1. Give an A/PTR/StaticInterface private IP and the public view.
    -clean, save, ValidationError raised
  2. Give an A/PTR/StaticInterface private IP and the public and private view.
    -clean, save, ValidationError raised

It seems that AddressRecords, StaticInterfaces, and PTRs might each need a custom clean_views method as outlined in the ViewMixin. Or possibly they could inherit it from a common ancestor? I dunno.

Creation and deletion of users

If a given user does not exist, and a container administrator attempts to add them to a container, they should be created and added to the container, even if they can't log in. (Potential extension of this: display a confirmation box if the user does not exist in LDAP/whatever.)

There needs to be a way to delete users from containers. Furthermore, there needs to be a way to delete a user, and remove them from all containers.

Unneeded users should be deleted regularly to keep the database clean. Some policies we suggested:

  • Delete a user as soon as they no longer have permissions to any container.
  • Delete users without any permissions regularly, such as at the end of each term.

Users' first name, last name, and e-mail will also need to be updated regularly. Some policies we suggested:

  • Update the user when they log in
  • Update the user when their permissions change

`cydhcp.keyvalue.base_option.CommonOption` doesn't validate correctly

For the following ISC dhcpd options, hostnames are allowed as well as IPs:

ntp-servers
domain-name-servers
netbios-name-servers
time-servers (distinct from ntp-servers)
log-servers
next-server
cookie-servers
finger-server
font-server
impress-server

However, for all of these options, the cydhcp.keyvalue.base_option.CommonOption class's option validation methods (aa*) call IP validation functions rather than IP-or-domain validation functions. For instance, _aa_time_servers validates the option as a list of IPs, rather than a list of IPs and domains.

(By the way, several sources say domains can include underscores but hostnames can't. @murrown says we should allow underscores in hostnames "contrary to existing standards". I'm tentatively allowing them until someone tells me not to.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.